#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_test:
	# These tests pass on my system and in sbuild but fail in pbuilder
	# (except when I run dpkg-buildpackage by hand there) and in my
	# autopkgtest environment so let's call them brittle.
	rm t/32-keyserver_defined_on_command_line.t
	rm t/33-checkGpgHasDefinedKeyserver.t
	xvfb-run -a dh_auto_test

override_dh_auto_install:
	dh_auto_install
	install -D -m 644 $(CURDIR)/share/applications/parcimonie.desktop \
	    $(TMP)/etc/xdg/autostart/parcimonie.desktop
	rm -rf $(TMP)/usr/share/perl5/auto/
