#!/usr/bin/make -f # # Shorewall firewall (http://www.shorewall.net) # debianized version # Include dpatch stuff. include /usr/share/dpatch/dpatch.make # shorewall version export V=`cat install.sh | grep "^VERSION=" | head -n 1 | cut -f 2 -d "="` VMAJOR:=$(shell echo $(V) |cut -f 1 -d .) VMINOR:=$(shell echo $(V) |cut -f 2 -d .) VPATCH:=$(shell echo $(V) |cut -f 3 -d .) NEXTPATCH:=$(shell expr $(VPATCH) + 1) SRWL=$(CURDIR)/debian/shorewall-shell build: patch build-stamp build-stamp: dh_testdir # there's nothing to compile ;-) touch build-stamp clean: clean-patched unpatch clean-patched: dh_testdir dh_testroot rm -f build-stamp rm -f debian/shorewall-shell.substvars # clean the build directory rm -rf $(SRWL) dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs echo 'shorewall:next=$(VMAJOR).$(VMINOR).$(NEXTPATCH)~' \ > debian/shorewall-shell.substvars dh_install install -m 644 debian/shorewall-shell.lintian $(SRWL)/usr/share/lintian/overrides/shorewall-shell # set version number echo $V > $(SRWL)/usr/share/shorewall-shell/version # global configuration has to be fully readable chmod 644 $(SRWL)/usr/share/shorewall-shell/* # must be executable chmod 755 $(SRWL)/usr/share/shorewall-shell/compiler binary-indep: build install dh_testdir dh_testroot dh_installdocs releasenotes.txt dh_installchangelogs changelog.txt dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb -v binary-arch: build install binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install patch unpatch \ clean-patched