]>
Commit | Line | Data |
---|---|---|
c436b421 PL |
1 | #!/usr/bin/make -f |
2 | DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) | |
3 | ||
4 | # Enable hardening features for daemons | |
5 | # Note: blhc (build log hardening check) will find these false positivies: CPPFLAGS 2 missing, LDFLAGS 1 missing | |
6 | export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie | |
7 | DPKG_EXPORT_BUILDFLAGS = 1 | |
8 | # Include buildflags.mk so we can append to the vars it sets. | |
9 | include /usr/share/dpkg/buildflags.mk | |
10 | ||
11 | # Use new build system | |
12 | %: | |
13 | dh $@ \ | |
14 | --with autoreconf \ | |
15 | --parallel | |
16 | ||
17 | override_dh_auto_configure: | |
18 | dh_auto_configure -- \ | |
19 | --sysconfdir=/etc/powerdns \ | |
20 | --enable-unit-tests \ | |
66f0acb2 | 21 | --with-lua=luajit \ |
c436b421 PL |
22 | --with-protobuf=yes \ |
23 | --with-net-snmp \ | |
24 | --disable-silent-rules \ | |
25 | --disable-systemd | |
26 | ||
27 | override_dh_auto_install: | |
28 | dh_auto_install -- STRIP_BINARIES=0 | |
29 | rm -f debian/tmp/etc/powerdns/recursor.conf-dist | |
30 | ./pdns_recursor --no-config --config | sed \ | |
31 | -e 's!# config-dir=.*!config-dir=/etc/powerdns!' \ | |
32 | -e 's!# local-address=.*!local-address=127.0.0.1!' \ | |
33 | -e 's!# quiet=.*!quiet=yes!' \ | |
34 | -e 's!# setgid=.*!setgid=pdns!' \ | |
35 | -e 's!# setuid=.*!setuid=pdns!' \ | |
c436b421 PL |
36 | > debian/tmp/etc/powerdns/recursor.conf |
37 | ||
38 | override_dh_strip: | |
39 | dh_strip --dbg-package=pdns-recursor-dbg | |
40 | ||
41 | override_dh_installinit: | |
42 | dh_installinit --error-handler=initscript_error | |
43 | ||
44 | override_dh_gencontrol: | |
45 | dh_gencontrol -- $(SUBSTVARS) |