#!/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
include /usr/share/dpkg/pkg-info.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 '\,( *),i \1' {} +
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__
# 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
# Since we do not maintain a symbols file for the libraries shipped in
# kea-common, make the shlibs control file more strict, generating dependencies
# such as "libkea-util 52 kea-common (= 2.2.0-5)" instead of the less strict
# "libkea-util 52 kea-common (>= 2.2.0)".
override_dh_makeshlibs:
dh_makeshlibs -pkea-common -V'kea-common (= ${DEB_VERSION})'
dh_makeshlibs -Nkea-common