2 DEB_HOST_ARCH_OS ?
= $(shell dpkg-architecture
-qDEB_HOST_ARCH_OS
)
3 DEB_HOST_ARCH_BITS ?
= $(shell dpkg-architecture
-qDEB_HOST_ARCH_BITS
)
4 DEB_HOST_MULTIARCH ?
= $(shell dpkg-architecture
-qDEB_HOST_MULTIARCH
)
7 backends
:= bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lua lua2 mydns remote random opendbx tinydns
9 # Disable systemd integration on non-linux archs
10 ifeq ($(DEB_HOST_ARCH_OS
),linux
)
11 CONFIGURE_ARGS
+= --enable-systemd
--with-systemd
=/lib
/systemd
/system
13 CONFIGURE_ARGS
+= --disable-systemd
17 # Use new build system
24 override_dh_auto_configure
:
25 test -f pdns
/dnslabeltext.
cc && mv pdns
/dnslabeltext.
cc debian
/dnslabeltext.
cc.moved || true
26 dh_auto_configure
-- \
27 --sysconfdir
=/etc
/powerdns \
28 --with-dynmodules
="$(backends)" \
35 --enable-experimental-pkcs11 \
36 --enable-lua-records \
41 dh_strip
--ddeb-migration
='pdns-server-dbg (<< 4.0.0-0)'
43 override_dh_systemd_enable
:
44 dh_systemd_enable
--name
=pdns
46 # init script needs to be named pdns, not pdns-server. if no pdns-backend
47 # is installed, start will fail, so pass --no-start. backends will trigger
49 override_dh_installinit
:
50 dh_installinit
--error-handler
=initscript_error
--no-start
--restart-after-upgrade
--name
=pdns
54 .
/pdns
/pdns_server
--no-config
--config | sed \
55 -e
's!# module-dir=.*!!' \
56 -e
's!# include-dir=.*!&\ninclude-dir=/etc/powerdns/pdns.d!' \
57 -e
's!# launch=.*!&\nlaunch=!' \
58 -e
's!# setgid=.*!setgid=pdns!' \
59 -e
's!# setuid=.*!setuid=pdns!' \
60 > debian
/pdns-server
/etc
/powerdns
/pdns.conf
61 ifeq ($(DEB_HOST_ARCH_BITS
),32)
62 echo RestrictAddressFamilies is broken on
32bit
, removing it from service file
63 perl
-ni
-e
'print unless /RestrictAddressFamilies/' debian
/pdns-server
/lib
/systemd
/system
/*.service
66 # Verbose tests (shows used compiler/linker and their flags)
67 override_dh_auto_test
:
68 echo Skipping make
test, as dependencies are missing.
73 # these files often contain passwords.
74 chmod
0600 debian
/pdns-server
/etc
/powerdns
/pdns.conf
78 test -f debian
/dnslabeltext.
cc.moved
&& mv debian
/dnslabeltext.
cc.moved pdns
/dnslabeltext.
cc || true