#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CONFIGURE_FLAGS += \
  --with-systemdsystemunitdir=$(shell pkgconf --variable=systemd_system_unit_dir systemd) \
  --disable-manuals

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_install:
	install -m 755 contrib/cbc-apitool.py debian/tmp/usr/bin/cbc-apitool
	dh_install

override_dh_auto_test:
	dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start
