#!/usr/bin/make -f

# Enable compiler hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Set the user environment variable required by the test suite.
export USER=testuser

# Helpful variables
PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

override_dh_auto_configure:
	dh_auto_configure -- LIBS="-lsasl2" DEFINE="-DSASL2"

override_dh_auto_test:
	dh_auto_test

override_dh_fixperms:
	find $(TMP) -type f -name "*.pod" -print0 | xargs -r0 chmod 644
	dh_fixperms

%:
	dh $@
