]> git.ipfire.org Git - thirdparty/pdns.git/blame - builder-support/debian/dnsdist/debian-stretch/rules
set --enable-option-checking=fatal on all package builds
[thirdparty/pdns.git] / builder-support / debian / dnsdist / debian-stretch / rules
CommitLineData
eef054cf
PL
1#!/usr/bin/make -f
2# See debhelper(7) (uncomment to enable)
3# output every command that modifies files on the build system.
4#DH_VERBOSE = 1
5
6# Enable hardening features for daemons
7export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
8# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
9DPKG_EXPORT_BUILDFLAGS = 1
10include /usr/share/dpkg/default.mk
11
12# for atomic support on powerpc (automatic on mipsel)
13LDFLAGS += -latomic
14
15# Disable systemd integration on non-linux archs
16ifeq ($(DEB_HOST_ARCH_OS),linux)
17CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
18else
19CONFIGURE_ARGS += --disable-systemd
20endif
21
22
23%:
24 dh $@
25
26override_dh_auto_clean:
27 rm -f dnslabeltext.cc
28 dh_auto_clean
29
30override_dh_auto_configure:
31 ./configure \
e5d38a0f 32 --enable-option-checking=fatal \
eef054cf
PL
33 --host=$(DEB_HOST_GNU_TYPE) \
34 --build=$(DEB_BUILD_GNU_TYPE) \
35 --prefix=/usr \
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' \
6976b6a0 41 --enable-dns-over-tls \
eef054cf 42 --enable-dnscrypt \
3bbbeb11 43 --enable-dnstap \
04c46adc 44 --with-gnutls \
5578200d 45 --with-libcap \
cb264691 46 --with-libsodium \
ae80638a 47 --with-re2 \
eef054cf 48 --with-ebpf \
66f0acb2 49 --with-lua=luajit \
eef054cf
PL
50 --with-protobuf \
51 $(CONFIGURE_ARGS)
52
53override_dh_auto_build-arch:
54 dh_auto_build -- V=1
55
56override_dh_install:
57 dh_auto_install
58 echo Patching uid and git into debian/dnsdist/lib/systemd/system/*.service
59 perl -pi -e 's/(^ExecStart=.*)/$$1 -u _dnsdist -g _dnsdist/' debian/dnsdist/lib/systemd/system/*.service
60ifeq ($(DEB_HOST_ARCH_BITS),32)
61 echo RestrictAddressFamilies is broken on 32bit, removing it from service file
62 perl -ni -e 'print unless /RestrictAddressFamilies/' debian/dnsdist/lib/systemd/system/*.service
63else
64 echo Keeping RestrictAddressFamilies in debian/dnsdist/lib/systemd/system/*.service
65endif
66
67override_dh_installexamples:
68 cp dnsdistconf.lua dnsdist.conf
69 dh_installexamples
70 rm -f dnsdist.conf
71
72override_dh_installinit:
73 # do nothing here. avoids referencing a non-existant init script.
74