#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

# The meson build auto-detects systemd (systemd.pc) and, when it is present in the
# build environment, additionally configures and installs the optional systemd
# integration files (buffyboard.service, getty@.service.d/buffyboard.conf,
# unl0kr-agent.path, unl0kr-agent.service and /usr/libexec/unl0kr-agent).  Those
# extra files are not shipped by this packaging, so their presence makes
# dh_missing fail with "missing files, aborting" on exactly the build
# environments that provide systemd.pc (e.g. arm64/riscv64, where libudev-dev
# pulls in systemd-dev) while other architectures build fine - the failure is
# therefore not architecture specific but build environment dependent.  Disable
# the auto-detection explicitly so that the build and the resulting binary
# packages are identical everywhere and do not depend on systemd.pc being
# installed.
override_dh_auto_configure:
	dh_auto_configure -- -Dsystemd-buffyboard-service=disabled -Dsystemd-password-agent=disabled

override_dh_auto_clean:
	debconf-updatepo
	dh_auto_clean
