#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	    --with-auth-pam \
	    --with-group-queue=opensmtpq \
	    --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
	    --with-path-empty=/var/lib/opensmtpd/empty \
	    --with-path-mbox=/var/mail \
	    --with-table-db \
	    --with-user-queue=opensmtpq \
	    --with-user-smtpd=opensmtpd

override_dh_fixperms:
	dh_fixperms
	chgrp mail debian/opensmtpd/usr/libexec/opensmtpd/mail.local
	chmod 2755 debian/opensmtpd/usr/libexec/opensmtpd/mail.local
