#!/usr/bin/make -f
%:
	dh $@ --buildsystem=phppear --with phppear 

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=phppear
	sed -i '/name="CHANGELOG"/,/<\/file>/d' */package.xml

override_dh_installman:
	mkdir $(CURDIR)/debian/tmp
	cd debian/phpmd/usr/share/php && \
        help2man --no-info --no-discard-stderr \
        --name='PHPMD command line interface' \
        ../../bin/phpmd \
        > $(CURDIR)/debian/tmp/phpmd.1
	dh_installman
