#!/usr/bin/make -f # $HeadURL$ $LastChangedRevision$ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PACKAGE=ahtools configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) -s @# Make paths Debian compliant. perl -pi -e 's#^STT_DIR=.*#STT_DIR=/var/run/shell-firewall#' bin/shell-firewall @# Don't break users' systems if they've install ahtools for something other than the firewall. perl -pi -e 's/^ENABLE=.*/ENABLE=false/' etc/shell-firewall.conf $(MAKE) -s tests touch build-stamp clean: dh_testdir rm -f build-stamp configure-stamp $(MAKE) -s clean distclean dh_clean install: build dh_testdir dh_installdirs mkdir -p $(CURDIR)/debian/$(PACKAGE)/usr/{bin,sbin} cp bin/* $(CURDIR)/debian/$(PACKAGE)/usr/bin chmod 755 $(CURDIR)/debian/$(PACKAGE)/usr/bin* mv $(CURDIR)/debian/$(PACKAGE)/usr/bin/shell-firewall $(CURDIR)/debian/$(PACKAGE)/usr/sbin/ mkdir -p $(CURDIR)/debian/$(PACKAGE)/etc cp etc/* $(CURDIR)/debian/$(PACKAGE)/etc chmod 644 $(CURDIR)/debian/$(PACKAGE)/etc/* mkdir -p $(CURDIR)/debian/$(PACKAGE)/etc/{network/if,ppp/ip}-{up,down}.d for D in $(CURDIR)/debian/$(PACKAGE)/etc/{network/if,ppp/ip}-{up,down}.d; do \ ln -s ../../../usr/sbin/shell-firewall $$D/; \ done mkdir -p $(CURDIR)/debian/$(PACKAGE)/var/run/shell-firewall binary-indep: build install dh_installdocs dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch