#!/usr/bin/make -f

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

ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

%:
	dh $@

override_dh_auto_test:
	xvfb-run -a dh_auto_test

override_dh_auto_install:
	dh_auto_install
	$(RM) -rv $(TMP)/$(ARCHLIB)/auto/Tk/pTk    # conflicts with perl-tk
	$(RM) -rv $(TMP)/$(ARCHLIB)/Tk/pTk         # conflicts with perl-tk

override_dh_installexamples:
	dh_installexamples
	chmod +x $(TMP)/usr/share/doc/$(PACKAGE)/examples/*
