#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
export EXTRA_CFLAGS = $(CFLAGS)
export DH_VERBOSE = 1

%:
	dh $@

override_dh_auto_install:
	dh_auto_install -- prefix=/usr mandir=/usr/share/man

execute_after_dh_install:
	dh_apparmor --profile-name=usr.sbin.ptp4l -plinuxptp
	dh_apparmor --profile-name=usr.sbin.timemaster -plinuxptp
	dh_apparmor --profile-name=usr.sbin.phc2sys -plinuxptp

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start --name=ptp4l@
	dh_installsystemd --no-enable --no-start --name=phc2sys@
	dh_installsystemd --no-enable --no-start --name=timemaster
