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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
export DEB_CFLAGS_MAINT_APPEND = -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE -DDIG_SIGCHASE
export DPKG_GENSYMBOLS_CHECK_LEVEL := 4
include /usr/share/dpkg/default.mk
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
COMMA = ,
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
endif
# Disable benchmarks when building the package
export CI = yes
export arch = $(DEB_HOST_ARCH)
DEB_VERSION_REVISION := $(call dpkg_late_eval,DEB_VERSION_REVISION,echo '$(DEB_VERSION_UPSTREAM_REVISION)' | sed -e 's/^[^-]*//')
SED_VERSION_EXTENSIONS := \
sed -e 's/\[bind_VERSION_EXTRA\], .*)/[bind_VERSION_EXTRA], $(DEB_VERSION_REVISION)-$(DEB_VENDOR))/'
EXCLUDE_FILES := \
--exclude=.la \
--exclude=lwresd \
--exclude=__pycache_ \
--exclude=sample.so \
--exclude=dlzexternal.so \
--exclude=test-async.so \
--exclude=libbind9.la \
--exclude=libdns.la \
--exclude=libirs.la \
--exclude=libisccc.la \
--exclude=libisccfg.la \
--exclude=libisc.la \
--exclude=libns.la
%:
dh $@
prepare_version_extensions:
if [ ! -f configure.ac.bak ]; then \
mv configure.ac configure.ac.bak; \
$(SED_VERSION_EXTENSIONS) < configure.ac.bak > configure.ac; \
fi
clean_version_extensions:
if [ -f configure.ac.bak ]; then \
mv configure.ac.bak configure.ac; \
fi
override_dh_auto_configure:
dh_auto_configure -- \
--sysconfdir=/etc/bind \
--localstatedir=/ \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
-Dcmocka=enabled \
-Ddnstap=enabled \
-Ddoh=enabled \
-Dfuzzing=disabled \
-Dgeoip=enabled \
-Dgssapi=enabled \
-Didn=enabled \
-Djemalloc=enabled \
-Dline=enabled \
-Dlmdb=enabled \
-Dstats-json=enabled \
-Dstats-xml=enabled \
-Dzlib=enabled \
$(EXTRA_FEATURES)
override_dh_auto_build-arch:
dh_auto_build -a -- all
override_dh_auto_build-indep:
sed -i 's/:gl:`\([#!][^`]*\)`/[GL \1]/g' doc/notes/*.rst
dh_auto_build -i -- arm
override_dh_auto_clean: clean_version_extensions
sed -i 's/\[GL \([#!][^]]*\)]/:gl:`\1`/g' doc/notes/*.rst
dh_auto_clean
override_dh_auto_test:
-dh_auto_test -- --no-suite flaky
override_dh_auto_install-arch:
DESTDIR=$(CURDIR)/debian/tmp dh_auto_install install
override_dh_auto_install-indep:
install -d -m 755 $(CURDIR)/debian/tmp/usr/share/doc/bind/
cp -p -r obj-$(DEB_HOST_MULTIARCH)/arm/* $(CURDIR)/debian/tmp/usr/share/doc/bind/
override_dh_installinit:
dh_installinit -pbind9 --name=named
dh_installinit --remaining-packages
override_dh_installsystemd:
dh_installsystemd -pbind9 --no-enable --name=named-resolvconf named-resolvconf.service
dh_installsystemd -pbind9 --name=named named.service
dh_installsystemd --remaining-packages
override_dh_install:
dh_install $(EXCLUDE_FILES)
# Install apparmor profile
dh_apparmor -pbind9 --profile-name=usr.sbin.named
override_dh_missing:
dh_missing $(EXCLUDE_FILES) --fail-missing
.PHONY: prepare_version_extensions clean_version_extensions
|