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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
UPSTREAM := $(DEB_VERSION_UPSTREAM)
INSTALL := $(CURDIR)/debian/php-doctrine-dbal/usr/share/php/Doctrine/DBAL
%:
dh $@ -XREADME.markdown
override_dh_auto_build:
phpabtpl composer.json > debian/autoload.php.tpl
phpab --tolerant \
--output src/autoload.php \
--template debian/autoload.php.tpl \
src
mkdir --parents vendor Doctrine
phpabtpl \
--require doctrine/dbal \
--require symfony/cache \
> debian/autoload.tests.php.tpl
phpab \
--output vendor/autoload.php \
--template debian/autoload.tests.php.tpl \
tests
ln -s ../src Doctrine/DBAL
override_dh_auto_clean:
override_dh_auto_test:
phpunit --bootstrap vendor/autoload.php
execute_before_dh_install:
mkdir --parents $(CURDIR)/debian/tmp
cp bin/doctrine-dbal.php debian/tmp/doctrine-dbal
execute_after_dh_install:
sed -i "s/@VERSION@/$(UPSTREAM)/;s/\+dfsg//" $(INSTALL)/Tools/Console/ConsoleRunner.php
override_dh_installchangelogs:
dh_installchangelogs debian/upstream/changelog
execute_before_dh_installman:
mkdir --parents $(CURDIR)/config
ln -s ../debian/cli-config.php $(CURDIR)/config
help2man \
--help-option=\ \
--version-string=$(UPSTREAM) \
--source="doctrine-dbal $(UPSTREAM)" \
--no-info \
--include=$(CURDIR)/debian/doctrine-dbal.1.in \
"echo -n Usage: doctrine-dbal && $(CURDIR)/bin/doctrine-dbal --no-ansi|tail -n+6" \
> $(CURDIR)/debian/tmp/doctrine-dbal.1
|