#!/usr/bin/make -f

%:
	dh $@ -XCommon/Cache -XCommon/Lexer -Xlib/Psr -XSymfony

override_dh_auto_build:
	phpab \
		--output lib/Doctrine/Common/Annotations/autoload.php \
		--template debian/autoload.php.tpl \
		lib/Doctrine/Common/Annotations
	mkdir --parents vendor
	ln -s /usr/share/php/Doctrine/Common/Cache lib/Doctrine/Common
	ln -s /usr/share/php/Doctrine/Common/Lexer lib/Doctrine/Common
	ln -s /usr/share/php/Psr lib
	ln -s /usr/share/php/Symfony lib
	phpab \
		--output vendor/autoload.php \
		--template debian/autoload.tests.php.tpl \
		--exclude */ClassNoNamespaceNoComment.php \
		tests/Doctrine/Tests

override_dh_auto_test:
	phpunit --include-path lib
