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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#!/usr/bin/make -f
#
# Shorewall firewall (http://www.shorewall.net)
# debianized version
export DH_COMPAT=4
# 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 "="`
SRWL=$(CURDIR)/debian/shorewall
build: patch build-stamp debian/po/templates.pot
build-stamp:
dh_testdir
# there's nothing to compile ;-)
touch build-stamp
debian/po/templates.pot: debian/shorewall.templates
@debconf-updatepo
# @podebconf-report-po
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
rm -f build-stamp
# clean the build directory
rm -rf $(SRWL)
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
dh_install
# Temporary zones are only available to root
chmod 750 $(SRWL)/var/lib/shorewall
# As well as configuration files
chmod 755 $(SRWL)/etc/shorewall
chmod 640 $(SRWL)/etc/shorewall/*
# set version number
echo $V > $(SRWL)/usr/share/shorewall/version
# global configuration has to be fully readable
chmod 644 $(SRWL)/usr/share/shorewall/*
# must be executable
chmod 755 $(SRWL)/usr/share/shorewall/help
chmod 755 $(SRWL)/usr/share/shorewall/firewall
chmod 755 $(SRWL)/usr/share/shorewall/functions
chmod 755 $(SRWL)/usr/share/shorewall/wait4ifup
chmod 755 $(SRWL)/usr/share/shorewall/compiler
# chmod 755 $(SRWL)/usr/share/shorewall/update-bogons
# remove useless license file from /usr/share/doc/shorewall/examples
rm $(SRWL)/usr/share/doc/shorewall/examples/LICENSE
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs releasenotes.txt debian/NEWS.Debian README.txt
# examples are installed through shorewall.install
dh_installman debian/shorewall.8
dh_installchangelogs changelog.txt
dh_installlogrotate
dh_installinit --no-start -u"start 40 S . stop 89 0 6 ."
dh_installdebconf
dh_compress -Xusr/share/doc/shorewall/default-config
dh_fixperms -Xetc/shorewall -Xvar/lib/shorewall
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
|