summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 44e6bc42279da0079c2220433e9debf967125e94 (plain)
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
#!/usr/bin/make -f

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic -fno-omit-frame-pointer
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

ifneq (,$(findstring arm64,$(DEB_TARGET_ARCH)))
	CONFIG_TESTS=disabled
else
	CONFIG_TESTS=enabled
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dkeyfile_default=/usr/share/dns/root.key \
		-Dinstall_root_keys=disabled \
		-Dmanaged_ta=disabled \
		-Droot_hints=/usr/share/dns/root.hints \
		-Dinstall_kresd_conf=enabled \
		-Dsystemd_files=enabled \
		-Dclient=enabled \
		-Dutils=enabled \
		-Ddoc=enabled \
		-Ddnstap=enabled \
		-Dunit_tests=enabled \
		-Dconfig_tests=$(CONFIG_TESTS) \
		-Dextra_tests=disabled \
		-Dmalloc=jemalloc

override_dh_auto_build:
	dh_auto_build -- doc
	dh_auto_build

override_dh_auto_install:
	sed -e's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' <debian/knot-resolver.postinst.in >debian/knot-resolver.postinst
	dh_auto_install

override_dh_installinit:
	dh_installinit -pknot-resolver --name=kresd --no-start

override_dh_missing:
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS