#!/usr/bin/make -f

include /usr/share/rustc/architecture.mk

%:
	dh $@ --buildsystem cargo

override_dh_auto_test:
	dh_auto_test -- test --all

execute_after_dh_install:
	# installs systemd service, udev rules, conf files and blackbox dir.
	$(MAKE) install-data \
		DESTDIR="debian/speakersafetyd" \
		UNITDIR="$(shell pkg-config --variable=systemdsystemunitdir systemd)" \
		UDEVDIR="$(shell pkg-config --variable=udevdir udev)/rules.d"
	# add sysusers snippets to maintscripts. drop at compat >= 14
	dh_installsysusers

override_dh_installsystemd:
	dh_installsystemd --no-enable
