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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
UPSTREAM := $(DEB_VERSION_UPSTREAM)
USRDIR := $(CURDIR)/build
%:
dh $@ -XCompiler.php
override_dh_auto_build:
phpabtpl composer.json > debian/autoload.php.tpl
phpab \
--output src/Composer/autoload.php \
--template debian/autoload.php.tpl \
src/Composer
mkdir --parents vendor build/share/php/data/Composer
# Mimic system path for tests
cp -r src/Composer build/share/php
cp -r LICENSE res build/share/php/data/Composer
phpabtpl \
--require-file ../build/share/php/Composer/autoload.php \
> debian/autoload.tests.php.tpl
phpab \
--tolerant \
--output vendor/autoload.php \
--template debian/autoload.tests.php.tpl \
--exclude tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_removed_include_paths_and_autolad_files.php \
--exclude tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_include_paths.php \
--exclude tests/Composer/Test/Autoload/Fixtures/autoload_real_functions_with_include_paths.php \
--exclude tests/Composer/Test/Autoload/Fixtures/autoload_real_functions_with_removed_include_paths_and_autolad_files.php \
--exclude tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/StripNoise.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/plugin-a/PluginA.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/plugin/a/PluginA.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/plugin-b/PluginB.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/plugin/b/PluginB.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/Hooks.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/composer/InstalledVersions.php \
--exclude tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/composer/ClassLoader.php \
--exclude tests/Composer/Test/Fixtures/functional/plugin-autoloading-only-loads-dependencies/plugin-a/PluginA.php \
--exclude tests/Composer/Test/Fixtures/functional/plugin-autoloading-only-loads-dependencies/plugin-b/PluginB.php \
--exclude tests/Composer/Test/Plugin/Fixtures/plugin-v9/Installer/Plugin.php \
--exclude tests/Composer/Test/Plugin/Fixtures/plugin-v2/Installer/Plugin2.php \
--exclude tests/Composer/Test/Plugin/Fixtures/plugin-v3/Installer/Plugin2.php \
tests/Composer/Test
override_dh_auto_test:
phpunit --include-path build/share/php --exclude-group remote --exclude-group git
override_dh_installdocs:
dh_installdocs -Xdoc/composer
execute_after_dh_install:
mkdir --parent $(CURDIR)/debian/tmp
cp -r bin build
cd $(USRDIR)/share/php && \
$(USRDIR)/bin/composer completion --no-interaction bash \
> $(CURDIR)/debian/tmp/composer
execute_before_dh_installman:
cd $(USRDIR)/share/php && help2man \
--help-option=\ \
--include=$(CURDIR)/debian/composer.1.in \
--version-string=$(UPSTREAM) \
--source="composer $(UPSTREAM)" \
--no-info \
--no-discard-stderr \
"echo -n 'Usage: composer' && $(USRDIR)/bin/composer --no-ansi | tail -n+10" \
> $(CURDIR)/debian/tmp/composer.1
|