#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_testdir
	CONFIG_SHELL=/bin/sh dh_auto_configure -- \
		CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
		LDFLAGS="$(LDFLAGS) -lresolv -Wl,-z,defs -L/usr/lib/libmilter" \
		--enable-filter-tests \
		--with-spf \
		--with-spf2-include=/usr/include/spf2 \
		--with-spf2-lib=/usr/lib \
		--with-sql-backend

override_dh_installdocs:
	dh_installdocs
	mv $(CURDIR)/debian/opendmarc/usr/share/doc/opendmarc/README \
		$(CURDIR)/debian/opendmarc/usr/share/doc/opendmarc/README.reports
	cp README $(CURDIR)/debian/opendmarc/usr/share/doc/opendmarc/README
	cp opendmarc/README $(CURDIR)/debian/opendmarc/usr/share/doc/opendmarc/README.opendmarc

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES