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
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND =
export SRCDIR = .
%:
dh $@
override_dh_auto_clean:
+$(MAKE) -f Makefile.linux clean
rm -f .configure.cache config.mk config.h Makefile netfilter/miniupnpd netfilter_nft/miniupnpd
override_dh_auto_configure:
# skip
override_dh_auto_build:
./configure --igd2 --ipv6 --vendorcfg --pcp-peer --portinuse --firewall=iptables
+$(MAKE) -f Makefile.linux miniupnpd
mv miniupnpd netfilter/
+$(MAKE) -f Makefile.linux clean
./configure --igd2 --ipv6 --vendorcfg --pcp-peer --portinuse --firewall=nftables
+$(MAKE) -f Makefile.linux_nft miniupnpd
mv miniupnpd netfilter_nft/
override_dh_auto_test:
# some test scripts missing from the tarball
override_dh_auto_install:
+$(MAKE) -f Makefile.linux_nft install STRIP=echo DESTDIR=debian/tmp
+$(MAKE) -f Makefile.linux install STRIP=echo DESTDIR=debian/tmp
# I don't know why
rm debian/tmp/etc/miniupnpd/miniupnpd.conf~
execute_after_dh_install-indep:
# Move the miniupnpd.conf in /usr/share so it's not marked as CONFFILE
mkdir -p $(CURDIR)/debian/miniupnpd/usr/share/miniupnpd
mv $(CURDIR)/debian/miniupnpd/etc/miniupnpd/miniupnpd.conf $(CURDIR)/debian/miniupnpd/usr/share/miniupnpd/
sed -i " \
/^secure_mode=no/ d; \
/^notify_interval=60/ d; \
s/^clean_ruleset_interval=600/#clean_ruleset_interval=600/; \
s/^allow/#allow/; \
s/^deny/#deny/; \
s/^uuid=.*/uuid=/; \
" $(CURDIR)/debian/miniupnpd/usr/share/miniupnpd/miniupnpd.conf
# Copy the /etc/default/miniupnpd to /usr/share
cp $(CURDIR)/debian/examples/miniupnpd.default $(CURDIR)/debian/miniupnpd/usr/share/miniupnpd/
override_dh_installinit-indep:
dh_installinit -i --no-enable --no-start
override_dh_installsystemd-indep:
dh_installsystemd -i --no-enable --no-start
############################################
### Below is to manage upstream Git repo ###
### and is not used during package build ###
############################################
display-po-stats:
cd $(CURDIR)/debian/po ; for i in *.po ; do \
echo -n $$i": " ; \
msgfmt -o /dev/null --statistic $$i ; \
done
call-for-po-trans:
podebconf-report-po --call --withtranslators --languageteam
|