]>
Commit | Line | Data |
---|---|---|
7680cd5b | 1 | #!/usr/bin/make -f |
7680cd5b | 2 | |
f1766172 | 3 | # Turn on all hardening flags, as we're a networked daemon. |
ef2ea4bf | 4 | # Note: blhc (build log hardening check) will find these false positives: CPPFLAGS 2 missing, LDFLAGS 1 missing |
f1766172 CH |
5 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* | |
7680cd5b | 7 | DPKG_EXPORT_BUILDFLAGS = 1 |
f1766172 | 8 | include /usr/share/dpkg/default.mk |
7680cd5b | 9 | |
7680cd5b | 10 | |
7680cd5b | 11 | %: |
f1766172 CH |
12 | dh $@ |
13 | ||
14 | override_dh_auto_clean: | |
15 | dh_auto_clean | |
16 | rm -f dnslabeltext.cc | |
17 | chmod +x mkpubsuffixcc || true | |
7680cd5b PL |
18 | |
19 | override_dh_auto_configure: | |
f1766172 | 20 | PATH=debian/configure-helpers/:$$PATH dh_auto_configure -- \ |
7680cd5b | 21 | --sysconfdir=/etc/powerdns \ |
f1766172 | 22 | --enable-systemd --with-systemd=/lib/systemd/system \ |
7680cd5b | 23 | --enable-unit-tests \ |
7680cd5b | 24 | --disable-silent-rules \ |
02a1700a PL |
25 | --with-service-user=pdns \ |
26 | --with-service-group=pdns \ | |
f1766172 CH |
27 | --with-libcap \ |
28 | --with-libsodium \ | |
29 | --with-lua \ | |
30 | --with-net-snmp \ | |
31 | --enable-dns-over-tls \ | |
580ad9a0 OM |
32 | --enable-dnstap \ |
33 | --enable-nod | |
7680cd5b PL |
34 | |
35 | override_dh_auto_install: | |
36 | dh_auto_install | |
46a7f788 PL |
37 | install -d debian/pdns-recursor/usr/share/pdns-recursor/lua-config |
38 | install -m 644 -t debian/pdns-recursor/usr/share/pdns-recursor/lua-config debian/lua-config/rootkeys.lua | |
39 | install -m 644 -t debian/pdns-recursor/etc/powerdns debian/recursor.lua | |
f1766172 CH |
40 | install -d debian/pdns-recursor/usr/share/pdns-recursor/snmp |
41 | install -m 644 -t debian/pdns-recursor/usr/share/pdns-recursor/snmp RECURSOR-MIB.txt | |
7680cd5b | 42 | rm -f debian/pdns-recursor/etc/powerdns/recursor.conf-dist |
9883d3f9 | 43 | rm -f debian/pdns-recursor/etc/powerdns/recursor.yml-dist |
f1766172 CH |
44 | ./pdns_recursor --no-config --config=default | sed \ |
45 | -e 's!^# config-dir=.*!config-dir=/etc/powerdns!' \ | |
46 | -e 's!^# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \ | |
47 | -e 's!^# include-dir=.*!&\ninclude-dir=/etc/powerdns/recursor.d!' \ | |
48 | -e 's!^# local-address=.*!local-address=127.0.0.1!' \ | |
49 | -e 's!^# lua-config-file=.*!lua-config-file=/etc/powerdns/recursor.lua!' \ | |
50 | -e 's!^# quiet=.*!quiet=yes!' \ | |
063d8ef4 | 51 | -e '/^# version-string=.*/d' \ |
7680cd5b PL |
52 | > debian/pdns-recursor/etc/powerdns/recursor.conf |
53 | ||
f1766172 CH |
54 | override_dh_auto_test: |
55 | ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) | |
56 | dh_auto_test | |
57 | -cat testrunner.log | |
58 | endif | |
7680cd5b PL |
59 | |
60 | override_dh_gencontrol: | |
61 | dh_gencontrol -- $(SUBSTVARS) | |
d9f1c2be C |
62 | |
63 | # Explicitly set a compression method, as Debian and Ubuntu defaults vary widely, | |
64 | # and xz support is not available in all tools yet. Removing this override can | |
65 | # make reprepro fail. | |
66 | override_dh_builddeb: | |
67 | dh_builddeb -- -Zgzip |