#!/usr/bin/make -f
%:
	dh $@

override_dh_installman:
	mkdir -p $(CURDIR)/debian/postgrey/usr/share/man/man8/
	mkdir -p $(CURDIR)/debian/postgrey/usr/share/man/man1/
	pod2man --section=8 postgrey \
		> $(CURDIR)/debian/postgrey/usr/share/man/man8/postgrey.8
	pod2man --section=8 policy-test \
		> $(CURDIR)/debian/postgrey/usr/share/man/man8/policy-test.8
	pod2man --section=1 contrib/postgreyreport \
		> $(CURDIR)/debian/postgrey/usr/share/man/man1/postgreyreport.1

override_dh_install:
	dh_install
	mv $(CURDIR)/debian/postgrey/usr/share/postgrey/postgrey_whitelist_clients \
	   $(CURDIR)/debian/postgrey/usr/share/postgrey/whitelist_clients
	mv $(CURDIR)/debian/postgrey/usr/share/postgrey/postgrey_whitelist_recipients \
	   $(CURDIR)/debian/postgrey/usr/share/postgrey/whitelist_recipients
