diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7982c6e --- /dev/null +++ b/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ --with python3 -X.la + +override_dh_auto_configure: + dh_auto_configure -- \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-openssl \ + --with-mysql \ + --with-pgsql \ + --with-boost-libs=-lboost_system \ + --enable-generate-docs \ + --enable-shell \ + --disable-static \ + --disable-rpath \ + --enable-generate-parser \ + --disable-dependency-tracking \ + --enable-perfdhcp \ + --without-werror \ + --with-site-packages=/usr/lib/python3/dist-packages + +execute_after_dh_auto_build-indep: + # Do not download external JS components in binary documentation package + # Inspired by similar removal in python-pyopencl + # Thanks to Andreas Beckmann + find doc/sphinx/_build/html -name '*.html' -exec sed -r -i -e '\,( *)<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>,i \1<script src="/usr/share/javascript/mathjax/MathJax.js"></script>' {} + + find doc/sphinx/_build/html -name '*.html' -exec sed -r -i -e 's,https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js,/usr/share/javascript/mathjax/config/TeX-MML-AM_CHTML.js,' {} + + +execute_after_dh_install: + dh_apparmor -pkea-ctrl-agent --profile-name=usr.sbin.kea-ctrl-agent + dh_apparmor -pkea-dhcp4-server --profile-name=usr.sbin.kea-dhcp4 + dh_apparmor -pkea-dhcp6-server --profile-name=usr.sbin.kea-dhcp6 + dh_apparmor -pkea-dhcp-ddns-server --profile-name=usr.sbin.kea-dhcp-ddns + dh_apparmor -pkea-common --profile-name=usr.sbin.kea-lfc + +override_dh_auto_test: + dh_auto_test --no-parallel + +execute_after_dh_auto_install: + rm -rv \ + debian/tmp/usr/share/doc/kea/ChangeLog \ + debian/tmp/usr/share/doc/kea/COPYING \ + debian/tmp/usr/lib/python3/dist-packages/kea/__pycache__ \ + debian/tmp/usr/lib/python3/dist-packages/kea/kea_connector2.py + # log to stdout (i.e. to to the systemd journal), and use a shorter log + # pattern that avoids logging information made redundant by the journal. + # adapted from: https://gitlab.isc.org/isc-projects/kea-packaging/-/blob/master/debian/rules + sed -i -e 's/"output": .*/"output": "stdout",/' -e 's@// "pattern"@"pattern"@' debian/tmp/etc/kea/kea-*.conf |