#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

D := $(CURDIR)/debian/openbgpd

%:
	dh $@

execute_after_dh_auto_clean:
	rm -rf autom4te.cache/ m4/ Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 compile config.guess config.sub configure configure~ depcomp ltmain.sh missing ylwrap

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-privsep-user=_openbgpd

# do not install a default configuration, since no sensible one is possible
execute_after_dh_auto_install:
	rm -rf $D/etc/
	dh_installsysusers

execute_after_dh_installsystemd:
	dh_installsystemd --name=bgplgd --no-start --no-enable

