#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

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

%:
	dh $@

override_dh_auto_test:
	LC_ALL=C.UTF-8 TERM=xterm dh_auto_test

override_dh_installexamples:
	dh_installexamples
	sed -i '1s|^#.*perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/* \
		$(TMP)$(ARCHLIB)/Term/ReadLine/Gnu/XS.pm
