#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	$(RM) -v $(TMP)/$(ARCHLIB)/Image/PNG/get-pixel.pl $(TMP)/$(ARCHLIB)/Image/PNG/nicemake.pl

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