File: rules

package info (click to toggle)
pdns 3.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 9,084 kB
  • sloc: cpp: 56,420; ansic: 37,838; sh: 12,762; sql: 1,081; makefile: 734; ruby: 560; yacc: 222; lex: 120; perl: 52; python: 15
file content (63 lines) | stat: -rwxr-xr-x 1,811 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Vendor and version
version := $(shell dpkg-parsechangelog -SVersion).$(shell dpkg-vendor --query Vendor)
CXXFLAGS += -DPACKAGEVERSION='"$(version)"'

# Backends
backends := bind ldap pipe gmysql gpgsql gsqlite3 geo lua lmdb mydns remote

DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Use new build system
%:
	dh $@ --with autoreconf --parallel

override_dh_auto_configure:
	mv pdns/dnslabeltext.cc debian/dnslabeltext.cc.moved
	./configure \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr \
		--sysconfdir=/etc/powerdns \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \
		--libexecdir='$${prefix}/lib' \
		--with-dynmodules="$(backends)" \
		--with-modules="" \
		--with-system-polarssl \
		--with-pgsql-includes=`pg_config --includedir` \
		--enable-cryptopp \
		--enable-botan1.10 \
		--enable-tools \
		--enable-unit-tests

# pdns-server has a debug package
override_dh_strip:
	dh_strip --dbg-package=pdns-server-dbg

# Additional permissions
override_dh_fixperms:
	dh_fixperms
	chmod 755 debian/pdns-server/etc/resolvconf/update.d/pdns

# init script needs to be named pdns, not pdns-server
override_dh_installinit:
	dh_systemd_enable --name=pdns
	dh_installinit --name=pdns
	dh_systemd_start --restart-after-upgrade

# Verbose build (shows used compiler/linker and their flags)
override_dh_auto_build-arch:
	dh_auto_build -- V=1

# Verbose tests (shows used compiler/linker and their flags)
override_dh_auto_test:
	echo Skipping make test, as dependencies are missing.
	#dh_auto_test -- V=1

# restore moved files
override_dh_clean:
	test -f debian/dnslabeltext.cc.moved && mv debian/dnslabeltext.cc.moved pdns/dnslabeltext.cc || true
	dh_clean