1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/make -f
# written by Jan Wagner <waja@cyconet.org>
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
./configure --prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info --sysconfdir=/etc \
--localstatedir=/var \
--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_BUILD_GNU_TYPE)
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
# Add here commands to compile the arch part of the package.
dh_testdir
$(MAKE)
touch build-stamp
clean:
rm -f build-stamp configure-stamp
ifeq ($(shell ls Makefile),Makefile)
$(MAKE) mrproper
endif
dh clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the arch part of the package
$(MAKE) DESTDIR=debian/arpalert install PREFIX=debian/arpalert/usr
install -d -m 0755 debian/arpalert/usr/share/doc/arpalert/examples/scripts/
cp -R scripts/contribs debian/arpalert/usr/share/doc/arpalert/examples/scripts/
cp -R scripts/test_scripts debian/arpalert/usr/share/doc/arpalert/examples/scripts/test
# move alert script to /usr/share/arpalert/
install -d -m 0755 debian/arpalert/usr/share/arpalert/
mv debian/arpalert/usr/share/doc/arpalert/examples/scripts/contribs/send_alert.pl debian/arpalert/usr/share/arpalert/
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh binary-arch --until dh_compress
dh_fixperms --exclude=/var/lib/arpwatch
dh binary-arch --after dh_fixperms
binary: binary-indep binary-arch
|