#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	# recreate empty manpage, this time from .pod instead of .pm
	pod2man --section=3pm $(CURDIR)/lib/IO/CaptureOutput.pod > $(TMP)/usr/share/man/man3/IO::CaptureOutput.3pm

override_dh_installexamples:
	dh_installexamples
	sed -i -e '1i #!/usr/bin/perl\n' $(TMP)/usr/share/doc/$(PACKAGE)/examples/capture.pl

