#!/usr/bin/make -f
#DH_VERBOSE = 1

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

%:
	dh $@

# set appropriate PREFIX
override_dh_auto_install:
	make PREFIX=$(shell pwd)/debian/physlock/usr install
	# ensure setuid bit is enabled
	chmod u+s $(shell pwd)/debian/physlock/usr/bin/physlock

override_dh_fixperms:
	dh_fixperms --exclude /usr/bin/physlock