File: rules

package info (click to toggle)
pdns 4.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,636 kB
  • sloc: cpp: 93,475; sh: 5,408; makefile: 2,232; sql: 860; ruby: 598; yacc: 228; lex: 130; ansic: 93; perl: 48; python: 4
file content (69 lines) | stat: -rwxr-xr-x 1,927 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f

# Turn on all hardening flags, as we're a networked daemon.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# Vendor and version
CXXFLAGS += -DPACKAGEVERSION='"$(DEB_VERSION).$(DEB_VENDOR)"'

# Avoid test failure in docker.
export PDNS_TEST_NO_IPV6=1

# Backends
backends := bind ldap lmdb lua2 pipe gmysql godbc gpgsql gsqlite3 geoip remote tinydns


%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f dnslabeltext.cc

override_dh_auto_configure:
	dh_auto_configure -- \
		--sysconfdir=/etc/powerdns \
		--enable-systemd --with-systemd=/lib/systemd/system \
		--with-dynmodules="$(backends)" \
		--with-modules="" \
		--enable-ixfrdist \
		--enable-tools \
		--with-protobuf \
		--enable-unit-tests \
		--enable-lua-records \
		--enable-experimental-pkcs11 \
		--enable-reproducible \
		--disable-silent-rules \
		$(CONFIGURE_ARGS)

override_dh_auto_install:
	dh_auto_install
	find debian/tmp/usr/lib -name '*.la' -delete
	rm debian/tmp/etc/powerdns/ixfrdist.example.yml debian/tmp/etc/powerdns/pdns.conf-dist

override_dh_installsystemd:
	dh_installsystemd --no-start -ppdns-server --name=pdns
	dh_installsystemd --no-start -ppdns-ixfrdist --name=ixfrdist

override_dh_install:
	dh_install
	./pdns/pdns_server --no-config --config=default | sed \
	  -e 's!# module-dir=.*!!' \
	  -e 's!# include-dir=.*!&\ninclude-dir=/etc/powerdns/pdns.d!' \
	  -e 's!# launch=.*!&\nlaunch=!' \
	  -e 's!# security-poll-suffix=.*!&\nsecurity-poll-suffix=!' \
	  > debian/pdns-server/etc/powerdns/pdns.conf

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./debian/tests-source/run
	make check || (cat pdns/test-suite.log; false)
endif

override_dh_fixperms:
	dh_fixperms
	# these files often contain passwords.
	chmod 0640 debian/pdns-server/etc/powerdns/pdns.conf