#!/usr/bin/make -f

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

override_dh_installman:
	cd $(CURDIR)/DoctrineORM-* && \
		help2man --help-option=\  --no-info \
		--name='Doctrine command line interface' \
		"php bin/doctrine-pear.php" \
		> $(CURDIR)/debian/tmp/doctrine.1
	dh_installman

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=phppear
	sed -i '/ role="data"/d;/ name="bin\/doctrine.bat" role="script"/,/<\/file>/d;/ name="bin\/doctrine.bat"/d' */package.xml

override_dh_fixperms:
	dh_fixperms
	chmod -x $(CURDIR)/debian/php-doctrine-orm/usr/bin/doctrine.php

get-orig-source:
	uscan --force --verbose --rename
