1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
UPSTREAM := $(DEB_VERSION_UPSTREAM)
%:
dh $@
execute_before_dh_auto_build:
phpabtpl composer.json > debian/autoload.php.tpl
phpab \
--tolerant \
--output lib/Doctrine/ORM/autoload.php \
--template debian/autoload.php.tpl \
lib/Doctrine/ORM
mkdir --parents vendor lib/data/Doctrine
ln -s ../../../doctrine-mapping.xsd lib/data/Doctrine/
phpab \
--tolerant \
--exclude tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php \
--exclude tests/Doctrine/Tests/ORM/Mapping/MappingDriverTestCase.php \
--exclude tests/Doctrine/Tests/Models/Enums/Product.php \
--output vendor/autoload.php \
--template debian/autoload.tests.php.tpl \
tests
override_dh_auto_test:
phpunit --include-path lib
execute_after_dh_install:
sed -i "s/@VERSION@/$(UPSTREAM)/;s/\+dfsg//" \
$(CURDIR)/debian/php-doctrine-orm/usr/share/php/Doctrine/ORM/Version.php
override_dh_installchangelogs:
dh_installchangelogs debian/upstream/changelog
|