#!/usr/bin/make -f

export CXX=%CXXCOMPILER%
export CC=%CCOMPILER%

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-mailuser=%MAILUSER% \
		--with-mailgroup=%MAILGROUP%

override_dh_auto_install:
	dh_auto_install --
	CONFIG_FILES=debian/auto_install.sh ./config.status
	chmod +x debian/auto_install.sh
	CONFIG_FILES=debian/mkinstall.pl ./config.status
	chmod +x debian/mkinstall.pl
	rm -f debian/libcourier-auth%SOVERSION%/lintian-overrides
	ln -s libcourier-auth.soname.lintian-overrides debian/libcourier-auth%SOVERSION%.lintian-overrides
	debian/auto_install.sh

override_dh_fixperms:
	:

override_dh_installsystemd:
	dh_installsystemd --package libcourier-auth

override_dh_builddeb:
	dh_builddeb -- $(DEB_BUILDDEB_OPTIONS)
