#!/usr/bin/make -f

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

BUILDHOME = $(shell perl -MDebian::Debhelper::Dh_Lib -e 'Debian::Debhelper::Dh_Lib::setup_home_and_xdg_dirs; print $$ENV{"HOME"};')

%:
	dh $@

override_dh_auto_test:
	HOME=$(BUILDHOME) dh_auto_test

override_dh_installexamples:
	dh_installexamples
	find $(TMP)/usr/share/doc/$(PACKAGE)/examples/* -type f | xargs chmod -x
