#!/usr/bin/make -f include /usr/share/dpkg/default.mk UPSTREAM := $(DEB_VERSION_UPSTREAM) %: dh $@ --with phpcomposer override_dh_auto_build: # Build static classloader for shipping phpab --output src/Autoload.php \ --template debian/Autoload.php.tpl src # Build classloader for tests mkdir --parents vendor phpab \ --output vendor/autoload.php \ --template debian/autoload.test.php.tpl \ --exclude tests/_files/BankAccountTest2.php \ --exclude tests/end-to-end/regression/Trac/783/OneTest.php \ tests # Workaround to ensure the local class takes precedence during tests. ln -s src PHPUnit # Provide phpunit.xsd where it belongs cp phpunit.xsd src override_dh_auto_clean: override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) ./phpunit else @echo "** tests disabled" endif override_dh_installman: mkdir --parent $(CURDIR)/debian/tmp help2man \ --help-option=\ \ --version-string=$(UPSTREAM) \ --no-info \ --include=$(CURDIR)/debian/phpunit.1.in \ "./phpunit --help|tail -n+3|sed 's/^ phpunit/ or: phpunit/'" \ > $(CURDIR)/debian/tmp/phpunit.1 dh_installman override_dh_installchangelogs: for i in $$(ls ChangeLog-*.md -r); do cat $$i >> CHANGELOG; done dh_installchangelogs