#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #DH_VERBOSE=1 -include /usr/share/dpkg/buildtools.mk include /usr/share/quilt/quilt.make export DEB_BUILD_MAINT_OPTIONS=hardening=+all CFLAGS =`dpkg-buildflags --get CPPFLAGS` CFLAGS +=`dpkg-buildflags --get CFLAGS` LDFLAGS = `dpkg-buildflags --get LDFLAGS` configure: configure-stamp configure-stamp: dh_testdir dh_update_autotools_config # Add here commands to configure the package. CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_configure --sourcedirectory trafshow* cd netwatch* && CC="$(CC)" CFLAGS="$(CFLAGS) $(LDFLAGS)" ./configure --prefix=debian/netdiag/usr --mandir=debian/netdiag/usr/share/man/man1 cd tcpblast* && CC="$(CC)" no_libnsl=yes ./configure touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: patch configure-stamp dh_testdir # Add here commands to compile the package. CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory tcpspray* CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory statnet* (cd trafshow*; make) (cd netwatch*; make) (cd tcpblast*; CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" make) CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory netload* touch $@ clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. (cd tcpspray; make clean) (cd statnet*; make clean; rm -f statnet.1 statnet.lsm) (cd trafshow*; [ ! -f Makefile ] || make distclean; rm -f config.log) (cd netwatch*; make clean; rm -f Makefile Make.common) (cd tcpblast*; [ ! -f Makefile ] || make distclean; rm -f confdefs.h) (cd netload*; make clean) debconf-updatepo dh_clean install: build dh_testdir dh_testroot dh_installdirs # Add here commands to install the package into debian/netdiag. (cd statnet*; \ make install INSTALLDIR=$(CURDIR)/debian/netdiag/usr/sbin; \ mv $(CURDIR)/debian/netdiag/usr/sbin/statnet $(CURDIR)/debian/netdiag/usr/bin) (cd tcpspray; \ make install BINDIR=$(CURDIR)/debian/netdiag/usr/bin) (cd netwatch*; \ make install INSTALLDIR=$(CURDIR)/debian/netdiag/usr) (cd trafshow*; \ make install prefix=$(CURDIR)/debian/netdiag/usr \ MANDEST=$(CURDIR)/debian/netdiag/usr/share/man \ BINDEST=$(CURDIR)/debian/netdiag/usr/sbin) (cd tcpblast*; \ make install prefix=$(CURDIR)/debian/netdiag/usr \ mandir=$(CURDIR)/debian/netdiag/usr/share/man) (cd netload*; \ make install TARGET=$(CURDIR)/debian/netdiag/usr/bin \ MANTARGET=$(CURDIR)/debian/netdiag/usr/share/man/man1) # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples netwatch*/netwatch.conf.eg dh_install dh_installmenu dh_installsystemd dh_installdebconf dh_installinit dh_installman statnet*/statnet.1 tcpspray/tcpspray.1 dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure