#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	# Remove the provided {encode,decode}.pl perl scripts and their manpages,
	# since the they will be installed as examples instead:
	$(RM) -rv $(TMP)/usr/bin/
	$(RM) -rv $(TMP)/usr/share/man/man1/

override_dh_installexamples:
	dh_installexamples
	# Fix interpreter shebang lines:
	sed -i '1s|^#! perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/libencode-arabic-perl/examples/*
