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 36 37
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
%:
dh $@
override_dh_auto_build:
dh_auto_build
cp -r lazy/Carbon/* src/Carbon/
phpabtpl --basedir src composer.json > debian/autoload.php.tpl
phpab \
--output src/Carbon/autoload.php \
--template debian/autoload.php.tpl \
--blacklist 'carbon\\dateperiodbase' \
--blacklist 'carbon\\lazytranslator' \
--blacklist 'carbon\\messageformatter\\lazymessageformatter' \
src/Carbon
override_dh_auto_test:
phpabtpl \
--require-file ../src/Carbon/autoload.php \
--require carbonphp/carbon-doctrine-types \
--require doctrine/dbal \
> debian/autoload.php.test.tpl
phpab \
--output tests/autoload.php \
--template debian/autoload.php.test.tpl \
--exclude 'tests/PHPUnit/AssertObjectHasPropertyPolyfillTrait.php' \
--blacklist 'carbon\\cli' \
--blacklist 'symfony\\component\\translation\\translatorinterface' \
tests
ifeq ($(DEB_BUILD_ARCH_BITS),64)
phpunit --bootstrap tests/autoload.php --include-path src
else
@echo 'The PHPUnit test suite requires a 64-bit system.' >&2
endif
|