diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /distro/deb/rules | |
parent | Initial commit. (diff) | |
download | knot-resolver-upstream.tar.xz knot-resolver-upstream.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | distro/deb/rules | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/distro/deb/rules b/distro/deb/rules new file mode 100755 index 0000000..758f30c --- /dev/null +++ b/distro/deb/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f + +# 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) +export PREFIX=/usr +export MODULEDIR=/usr/lib/knot-resolver +export ETCDIR=/etc/knot-resolver + +RUN_TESTS := yes +ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),hurd-i386 mips mipsel ppc64 ppc64el armel armhf arm64 kfreebsd-amd64 kfreebsd-i386)) + $(warning Disabling checks on $(DEB_HOST_ARCH)) + RUN_TESTS := no +endif + +%: + dh $@ + +override_dh_auto_clean-indep: + dh_auto_clean -- doc-clean http-clean + +override_dh_auto_build-arch: + CFLAGS="$${CFLAGS} -DNDEBUG" dh_auto_build -- V=1 BUILDMODE=static lib + CFLAGS="$${CFLAGS} -DNDEBUG" dh_auto_build -- V=1 \ + ROOTHINTS=/usr/share/dns/root.hints \ + KEYFILE_DEFAULT=/usr/share/dns/root.key + +override_dh_auto_build-indep: + dh_auto_build -- V=1 http + dh_auto_build -- V=1 doc-doxygen + cd doc && sphinx-build -b html -D html_theme=nature . html + +override_dh_auto_install-arch: + dh_auto_install --destdir=debian/tmp -- V=1 KEYFILE_DEFAULT=/usr/share/dns/root.key + rm -f debian/tmp/etc/knot-resolver/root.hints debian/tmp/etc/knot-resolver/icann-ca.pem + +override_dh_auto_install-indep: +# install just the http/2 module + make http-install DESTDIR=debian/tmp V=1 + +override_dh_installinit: + dh_installinit -pknot-resolver --name=kresd --no-start + +override_dh_installsystemd: + dh_installsystemd -pknot-resolver --name=kresd kresd-tls.socket kresd.socket + +override_dh_auto_test-indep: +override_dh_auto_test-arch: +ifeq ($(RUN_TESTS),yes) + dh_auto_test -- V=1 +endif + +override_dh_missing: + dh_missing --fail-missing + +override_dh_installchangelogs: + dh_installchangelogs NEWS |