From 55579b1b480003f926dbd895576c45dda741a748 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 21 Jul 2016 17:59:05 +0200 Subject: php-consolidation-annotated-command: backport --- Makefile | 4 ++++ composer.json | 39 ++++++++++++++++++++++++++++++++ php-consolidation-annotated-command.spec | 28 +++++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 Makefile create mode 100644 composer.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..2d6140d --- /dev/null +++ b/composer.json @@ -0,0 +1,39 @@ +{ + "name": "consolidation/annotated-command", + "description": "Initialize Symfony Console commands from annotated command class methods.", + "license": "MIT", + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "autoload":{ + "psr-4":{ + "Consolidation\\AnnotatedCommand\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Consolidation\\TestUtils\\": "tests/src" + } + }, + "require": { + "php": ">=5.4.0", + "psr/log": "~1.0", + "symfony/console": "~2.5|~3.0", + "symfony/finder": "~2.5|~3.0", + "phpdocumentor/reflection-docblock": "~2" + }, + "require-dev": { + "consolidation/output-formatters": "~1", + "phpunit/phpunit": "4.*", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "2.*" + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + } +} diff --git a/php-consolidation-annotated-command.spec b/php-consolidation-annotated-command.spec index 946c6f2..1ccaec9 100644 --- a/php-consolidation-annotated-command.spec +++ b/php-consolidation-annotated-command.spec @@ -1,6 +1,6 @@ +# remirepo spec file for php-consolidation-annotated-command, from: # # Fedora spec file for php-consolidation-annotated-command - # # Copyright (c) 2016 Shawn Iwinski # @@ -53,6 +53,7 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} @@ -140,6 +141,8 @@ AUTOLOAD %install +rm -rf %{buildroot} + mkdir -p %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand cp -rp src/* %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand/ @@ -160,13 +163,31 @@ $fedoraClassLoader->addPrefix('Consolidation\\TestUtils\\', __DIR__.'/tests-psr0 require_once '%{phpdir}/Consolidation/OutputFormatters/autoload.php'; BOOTSTRAP -%{_bindir}/phpunit --verbose --bootstrap bootstrap.php +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then + %{_bindir}/phpunit --verbose --bootstrap bootstrap.php +fi +exit $ret %else : Tests skipped %endif +%clean +rm -rf %{buildroot} + + %files +%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -176,5 +197,8 @@ BOOTSTRAP %changelog +* Thu Jul 21 2016 Remi Collet - 1.0.1-1 +- backport for remi repository + * Tue Jul 19 2016 Shawn Iwinski - 1.0.1-1 - Initial package -- cgit