#!/usr/bin/make -f

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

%:
	dh $@

override_dh_clean:
	dh_clean
	rm -rf $(BUILDHOME)

override_dh_auto_test:
	mkdir -p $(BUILDHOME)
	HOME=$(BUILDHOME) xvfb-run -a dh_auto_test

override_dh_fixperms:
	dh_fixperms
	chmod a-x $(TMP)/usr/share/perl5/Tk/Pod_usage.pod

override_dh_auto_install:
	dh_auto_install
	find $(TMP)/usr/share/man/ -type f -print0 | \
		xargs -r0 sed -i -e 's|Slaven Rezi.|Slaven Rezić|g'
