diff options
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 62 |
1 files changed, 26 insertions, 36 deletions
diff --git a/debian/rules b/debian/rules index cdb3a7f..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),riscv64)) - 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 - -# To make it build on sh4. -# See https://buildd.debian.org/status/fetch.php?pkg=knot&arch=sh4&ver=3.0.2-2&stamp=1607372581&raw=0 -ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),sh4)) - FASTPARSER := --disable-fastparser + 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 - FASTPARSER := --enable-fastparser -endif - -ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),hurd-i386)) - RECVMMSG:=--enable-recvmmsg=no -else - RECVMMSG:=--enable-recvmmsg=yes + 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 + RUN_TEST := -timeout --kill-after=5s 5m endif -ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 i386)) - RUN_TEST := -else - RUN_TEST := -timeout --kill-after=5s 5m +# 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 \ - --enable-dnstap \ - --with-module-dnstap=shared \ - --with-module-geoip=shared \ + --disable-silent-rules \ + $(RRL) \ + $(GEOIP) \ + $(DNSTAP) \ $(RECVMMSG) \ $(FASTPARSER) \ - --disable-silent-rules \ - --enable-quic + $(QUIC) override_dh_auto_configure-indep: pybuild --dir python/libknot --configure |