#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	# installed as example
	$(RM) -rv $(TMP)/usr/bin $(TMP)/usr/share/man/man1
	# works only on Windows
	$(RM) -v $(TMP)/usr/share/man/man3/Log::Report::Win32Locale.3pm \
		$(TMP)/usr/share/perl5/Log/Report/Win32Locale.pm \
		$(TMP)/usr/share/perl5/Log/Report/Win32Locale.pod

override_dh_installexamples:
	dh_installexamples
	sed -i '1s|^#!/usr/bin/env perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/*
