#!/usr/bin/make -f
# vim:noet:ts=4:sw=4:

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

ifeq ($(DEB_BUILD_ARCH_OS),linux)
SELINUX_FLAGS = --enable-selinux
endif

%:
	dh $@ --with quilt

override_dh_auto_configure:
	dh_autoreconf
	./configure --sysconfdir=/etc \
				--with-workdir=/var/lib/cfengine2 \
				--prefix=/usr \
				--mandir=\$${prefix}/share/man \
				--infodir=\$${prefix}/share/info \
				--with-docs $(SELINUX_FLAGS) \

override_dh_clean:
	dh_autoreconf_clean
	dh_clean

override_dh_strip:
	dh_strip --dbg-package=cfengine2-dbg
