2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
6 # Enable hardening features for daemons
7 export DEB_BUILD_MAINT_OPTIONS
=hardening
=+bindnow
,+pie
8 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
9 DPKG_EXPORT_BUILDFLAGS
= 1
10 include /usr
/share
/dpkg
/default.mk
12 # for atomic support on powerpc (automatic on mipsel)
15 # Disable systemd integration on non-linux archs
16 ifeq ($(DEB_HOST_ARCH_OS
),linux
)
17 CONFIGURE_ARGS
+= --enable-systemd
--with-systemd
=/lib
/systemd
/system
19 CONFIGURE_ARGS
+= --disable-systemd
26 override_dh_auto_clean
:
30 override_dh_auto_configure
:
32 --enable-option-checking
=fatal \
33 --host
=$(DEB_HOST_GNU_TYPE
) \
34 --build
=$(DEB_BUILD_GNU_TYPE
) \
36 --sysconfdir
=/etc
/dnsdist \
37 --mandir=\
$${prefix}/share
/man \
38 --infodir=\
$${prefix}/share
/info \
39 --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \
40 --libexecdir
='$${prefix}/lib' \
42 --enable-dns-over-tls \
50 --with-service-user
='_dnsdist' \
51 --with-service-group
='_dnsdist' \
54 override_dh_auto_build-arch
:
59 ifeq ($(DEB_HOST_ARCH_BITS
),32)
60 echo RestrictAddressFamilies is broken on
32bit
, removing it from service file
61 perl
-ni
-e
'print unless /RestrictAddressFamilies/' debian
/dnsdist
/lib
/systemd
/system
/*.service
63 echo Keeping RestrictAddressFamilies in debian
/dnsdist
/lib
/systemd
/system
/*.service
66 override_dh_installexamples
:
67 cp dnsdistconf.lua dnsdist.conf
72 dh_strip
--dbg-package
=dnsdist-dbg
74 override_dh_installinit
:
76 dh_systemd_start
-pdnsdist
--restart-after-upgrade dnsdist.service
80 # these files often contain passwords. 640 as it is chowned to root:_dnsdist
81 touch debian
/dnsdist
/etc
/dnsdist
/dnsdist.conf
82 chmod
0640 debian
/dnsdist
/etc
/dnsdist
/dnsdist.conf