#!/usr/bin/make -f

%:
	dh --with python2 --buildsystem=python_distutils $*

override_dh_auto_install:
	-test -f credits.pickle && touch credits.pickle.preserve
	cp debian/credits.pickle credits.pickle
	dh_auto_install

override_dh_auto_clean:
	-test -f credits.pickle.preserve || rm credits.pickle
	rm -f credits.pickle.preserve
	dh_auto_clean

override_dh_install:
	dh_install --list-missing --fail-missing

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	BZR_PLUGINS_AT=gtk@$(CURDIR) xvfb-run -a /usr/bin/bzr selftest -s bp.gtk
endif
