]> git.ipfire.org Git - thirdparty/pdns.git/blame - builder-support/debian/recursor/debian-jessie/rules
Update usage include
[thirdparty/pdns.git] / builder-support / debian / recursor / debian-jessie / rules
CommitLineData
c436b421
PL
1#!/usr/bin/make -f
2DEB_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
6export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
7DPKG_EXPORT_BUILDFLAGS = 1
8# Include buildflags.mk so we can append to the vars it sets.
9include /usr/share/dpkg/buildflags.mk
10
11# Disable systemd integration on non-linux archs
12ifeq ($(DEB_HOST_ARCH_OS),linux)
13CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
14DH_ARGS += --with systemd
15else
16CONFIGURE_ARGS += --disable-systemd
17endif
18
19
20# Use new build system
21%:
22 dh $@ \
23 --with autoreconf \
24 $(DH_ARGS)
25
26override_dh_auto_configure:
27 dh_auto_configure -- \
28 --sysconfdir=/etc/powerdns \
29 --enable-unit-tests \
30 --with-luajit \
31 --enable-libsodium \
32 --with-protobuf=yes \
33 --with-net-snmp \
34 --disable-silent-rules \
35 $(CONFIGURE_ARGS)
36
37override_dh_auto_install:
38 dh_auto_install -- STRIP_BINARIES=0
39 rm -f debian/tmp/etc/powerdns/recursor.conf-dist
40 ./pdns_recursor --no-config --config | sed \
41 -e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
42 -e 's!# local-address=.*!local-address=127.0.0.1!' \
43 -e 's!# quiet=.*!quiet=yes!' \
44 -e 's!# setgid=.*!setgid=pdns!' \
45 -e 's!# setuid=.*!setuid=pdns!' \
46 -e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
47 -e 's!# security-poll-suffix=.*!&\nsecurity-poll-suffix=!' \
48 > debian/tmp/etc/powerdns/recursor.conf
49
50override_dh_strip:
51 dh_strip --dbg-package=pdns-recursor-dbg
52
53override_dh_installinit:
54 dh_installinit --error-handler=initscript_error
55
56override_dh_gencontrol:
57 dh_gencontrol -- $(SUBSTVARS)