summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-21 17:44:50 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-21 17:44:50 +0200
commit3f07c63680405c11617b2a39acb467a04c4d064a (patch)
treed9a2e95f2ef8d19bf67066f60f38b07d8f600d72
parent0a51b4a66f6934f2e2acac938f2d4b2193f377ce (diff)
php-consolidation-output-formatters: backport
-rw-r--r--Makefile4
-rw-r--r--composer.json35
-rw-r--r--php-consolidation-output-formatters.spec27
3 files changed, 65 insertions, 1 deletions
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..541cdf6
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "consolidation/output-formatters",
+ "description": "Format text by applying transformations provided by plug-in formatters.",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Greg Anderson",
+ "email": "greg.1.anderson@greenknowe.org"
+ }
+ ],
+ "autoload":{
+ "psr-4":{
+ "Consolidation\\OutputFormatters\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Consolidation\\TestUtils\\": "tests/src"
+ }
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "symfony/console": "~2.5|~3.0"
+ },
+ "require-dev": {
+ "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-output-formatters.spec b/php-consolidation-output-formatters.spec
index 1c4bf4a..303f5d3 100644
--- a/php-consolidation-output-formatters.spec
+++ b/php-consolidation-output-formatters.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-consolidation-output-formatters, from
#
# Fedora spec file for php-consolidation-output-formatters
#
@@ -39,6 +40,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}
@@ -112,6 +114,8 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}/Consolidation/OutputFormatters
cp -rp src/* %{buildroot}%{phpdir}/Consolidation/OutputFormatters/
@@ -130,13 +134,31 @@ $fedoraClassLoader =
$fedoraClassLoader->addPrefix('Consolidation\\TestUtils\\', __DIR__.'/tests-psr0');
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
@@ -146,5 +168,8 @@ BOOTSTRAP
%changelog
+* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
+- backport for remi repository
+
* Tue Jul 19 2016 Shawn Iwinski <shawn@iwin.ski> - 1.0.0-1
- Initial package