#!/usr/bin/make -f

%:
	dh $@ --buildsystem=phppear --with phppear

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=phppear
	sed -i '/role="test"/d;' */package.xml

pear_pkg = $(shell ls | grep Mail)

override_dh_link:
	dh_link -O--buildsystem=phppear
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	chmod +x ./debian/tests_run
	./debian/tests_run $(pear_pkg)
endif
