summaryrefslogtreecommitdiffstats
path: root/distro/pkg/deb/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
commit830407e88f9d40d954356c3754f2647f91d5c06a (patch)
treed6a0ece6feea91f3c656166dbaa884ef8a29740e /distro/pkg/deb/rules
parentInitial commit. (diff)
downloadknot-resolver-830407e88f9d40d954356c3754f2647f91d5c06a.tar.xz
knot-resolver-830407e88f9d40d954356c3754f2647f91d5c06a.zip
Adding upstream version 5.6.0.upstream/5.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'distro/pkg/deb/rules')
-rwxr-xr-xdistro/pkg/deb/rules51
1 files changed, 51 insertions, 0 deletions
diff --git a/distro/pkg/deb/rules b/distro/pkg/deb/rules
new file mode 100755
index 0000000..c577476
--- /dev/null
+++ b/distro/pkg/deb/rules
@@ -0,0 +1,51 @@
+#!/usr/bin/make -f
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
+
+# 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
+
+export ARCH=$(DEB_HOST_GNU_CPU)
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ meson build_deb \
+ --buildtype=plain \
+ --prefix=/usr \
+ --libdir=lib \
+ -Ddoc=enabled \
+ -Dsystemd_files=enabled \
+ -Dclient=enabled \
+ -Ddnstap=enabled \
+ -Dkeyfile_default=/usr/share/dns/root.key \
+ -Droot_hints=/usr/share/dns/root.hints \
+ -Dinstall_kresd_conf=enabled \
+ -Dunit_tests=enabled \
+ -Dmalloc=jemalloc \
+ -Dc_args="$${CFLAGS}" \
+ -Dc_link_args="$${LDFLAGS}"
+ ninja -v -C build_deb
+ ninja -v -C build_deb doc
+
+override_dh_auto_install:
+ DESTDIR="${PWD}/debian/tmp" ninja -v -C build_deb install
+
+override_dh_auto_test:
+ meson test -C build_deb
+
+override_dh_missing:
+ dh_missing --fail-missing
+
+override_dh_strip:
+ dh_strip --dbg-package=knot-resolver-dbg