summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules50
1 files changed, 20 insertions, 30 deletions
diff --git a/debian/rules b/debian/rules
index 5bf8ad7..4bc13c2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,42 +1,37 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-export DEB_CFLAGS_MAINT_APPEND = -Wall -DNDEBUG
+export DEB_CFLAGS_MAINT_APPEND = -Wall -DNDEBUG
export DPKG_GENSYMBOLS_CHECK_LEVEL := 4
export KNOT_SOFTHSM2_DSO = /usr/lib/softhsm/libsofthsm2.so
export KNOT_VERSION_FORMAT = release
-
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),armel))
- export DEB_LDFLAGS_MAINT_APPEND += -latomic
-endif
+export KNOT_FULL_ARCHS = amd64 arm64 armhf i386 mips64el ppc64el riscv64 s390x ppc64
include /usr/share/dpkg/default.mk
-ifeq (maint,$(filter $(DEB_BUILD_OPTIONS),maint))
- FASTPARSER := --disable-fastparser
-else
+# Enable extra modules and features only for well supported architectures
+ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(KNOT_FULL_ARCHS)))
FASTPARSER := --enable-fastparser
-endif
-
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 i386))
- RUN_TEST :=
+ RECVMMSG := --enable-recvmmsg=yes
+ QUIC := --enable-quic=auto
+ RRL := --with-module-rrl=yes
+ GEOIP := --with-module-geoip=shared
+ DNSTAP := --enable-dnstap --with-module-dnstap=shared
+ RUN_TEST :=
else
- RUN_TEST := -timeout --kill-after=5s 5m
-endif
-
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),hurd-amd64 hurd-i386 sh4))
FASTPARSER := --disable-fastparser
RECVMMSG := --enable-recvmmsg=no
+ QUIC := --enable-quic=no
RRL := --with-module-rrl=no
GEOIP := --with-modle-geoip=no
DNSTAP := --disable-dnstap --with-module-dnstap=no
-else
- FASTPARSER := --enable-fastparser
- RECVMMSG := --enable-recvmmsg=yes
- RRL := --with-module-rrl=yes
- GEOIP := --with-module-geoip=shared
- DNSTAP := --enable-dnstap --with-module-dnstap=shared
+ RUN_TEST := -timeout --kill-after=5s 5m
+endif
+
+# Disable fastparser if requested
+ifeq (maint,$(filter $(DEB_BUILD_OPTIONS),maint))
+ FASTPARSER := --disable-fastparser
endif
# MAJOR.MINOR version part
@@ -46,18 +41,13 @@ BASE_VERSION := $(shell echo $(DEB_VERSION) | sed 's/^\([^.]\+\.[^.]\+\).*/\1/')
# invocation due to bug in dh-python's plugin_pyproject.py wheel unpack
export PYBUILD_SYSTEM = distutils
-
%:
dh $@ \
--exclude=.la --exclude=example.com.zone \
--with python3
override_dh_auto_configure:
- echo confirming architecture...
- echo 'arch:' $(DEB_HOST_ARCH)
- echo 'filtered arch:' $(filter $(DEB_HOST_ARCH),mips powerpc riscv64)
- echo 'DEB_LDFLAGS_MAINT_APPEND:' $(DEB_LDFLAGS_MAINT_APPEND)
- echo done
+ @echo 'architecture:' $(DEB_HOST_ARCH)
dh_auto_configure -- \
--sysconfdir=/etc \
--localstatedir=/var/lib \
@@ -66,13 +56,13 @@ override_dh_auto_configure:
--with-moduledir=/usr/lib/$(DEB_HOST_MULTIARCH)/knot/modules-$(BASE_VERSION) \
--with-storage=/var/lib/knot \
--enable-systemd=auto \
+ --disable-silent-rules \
$(RRL) \
$(GEOIP) \
$(DNSTAP) \
$(RECVMMSG) \
$(FASTPARSER) \
- --disable-silent-rules \
- --enable-quic
+ $(QUIC)
override_dh_auto_configure-indep:
pybuild --dir python/libknot --configure