#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export INSTALL=/usr/bin/install --strip-program=true

LDFLAGS += -Wl,--as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-warnings \
		--enable-so-linger \
		--with-regex \
		--with-libwrap \
		--with-libldap \
		--with-crypt

override_dh_auto_build-indep:
	dh_auto_build -i -- -C doc all

override_dh_auto_install:
	dh_auto_install -- INST_ROOT=$(CURDIR)/debian/tmp/

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

%:
	dh $@
