#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)
PERL   ?= /usr/bin/perl

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --disable=TT-fonts,ungif

override_dh_fixperms:
	dh_fixperms
	chmod 644 $(TMP)/usr/lib/perl5/Imager/APIRef.pod

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