#!/usr/bin/make -f

%:
	dh $@ --with modaliases

current_dir=$(shell pwd)
override_dh_auto_configure:
	dh_auto_configure --sourcedirectory=. --builddirectory=build -- \
		--install-prefix="$(current_dir)/debian/tmp"

override_dh_installsystemd:
	dh_installsystemd -ppwl-core-service --name=pwl_core pwl-core.service
	dh_installsystemd -ppwl-fwupdate-service --name=pwl_fwupdate pwl-fwupdate.service
	dh_installsystemd -ppwl-madpt-service --name=pwl_madpt pwl-madpt.service
	dh_installsystemd -ppwl-pref-service --name=pwl_pref pwl-pref.service

override_dh_auto_build:
	cmake --build build

override_dh_auto_install:
	cmake --install build

override_dh_auto_clean:
	dh_auto_clean -- \
		rm -rf debian/tmp
	rm -rf build/
