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


export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# #1077018
export DEB_CFLAGS_MAINT_APPEND  = -DFINIT_NOLOGIN_PATH="\"/run/nologin\""
export DEB_LDFLAGS_MAINT_APPEND =


%:
	dh $@ --with autoreconf

build-indep:
	# pass

override_dh_auto_configure-arch:
	dh_auto_configure -a -- \
		--prefix=/usr \
		--enable-all-plugins \
		--with-random-seed \
		--with-keventd \
		--with-sulogin \
		--with-watchdog

override_dh_auto_test-arch:
	# unshare: unshare failed: Operation not permitted
	# dh_auto_test -a --no-parallel

execute_after_dh_install-arch:
	rm debian/finit/etc/finit.d/Makefile* debian/finit/etc/finit.d/available/Makefile*
	chmod -x debian/finit/usr/lib/finit/rescue.conf

execute_after_dh_installexamples-arch:
	chmod -x debian/finit/usr/share/doc/finit/examples/sample.conf
