summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-21 17:55:23 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-21 17:55:23 +0200
commit8137f40063f4a905c084efd0f7e806e3eb46858f (patch)
tree1a10989f0e04ce5a3635df99e1b0a4c162ca8257
parent53b8614cc88e0f37aca75d595b91743f594d8730 (diff)
php-jakub-onderka-php-console-color: backport
-rw-r--r--Makefile4
-rw-r--r--composer.json24
-rw-r--r--php-jakub-onderka-php-console-color.spec29
3 files changed, 55 insertions, 2 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..0721abc
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,24 @@
+{
+ "name": "jakub-onderka/php-console-color",
+ "license": "BSD-2-Clause",
+ "version": "0.1",
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "jakub.onderka@gmail.com"
+ }
+ ],
+ "autoload": {
+ "psr-0": {"JakubOnderka\\PhpConsoleColor": "src/"}
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*",
+ "jakub-onderka/php-parallel-lint": "0.*",
+ "jakub-onderka/php-var-dump-check": "0.*",
+ "squizlabs/php_codesniffer": "1.*",
+ "jakub-onderka/php-code-style": "1.0"
+ }
+} \ No newline at end of file
diff --git a/php-jakub-onderka-php-console-color.spec b/php-jakub-onderka-php-console-color.spec
index b1d0f03..3251780 100644
--- a/php-jakub-onderka-php-console-color.spec
+++ b/php-jakub-onderka-php-console-color.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-jakub-onderka-php-console-color, from
#
# Fedora spec file for php-jakub-onderka-php-console-color
#
@@ -40,6 +41,7 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
# https://patch-diff.githubusercontent.com/raw/JakubOnderka/PHP-Console-Color/pull/8.patch
Patch0: %{name}-pr8-add-license.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -110,20 +112,40 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
%check
%if %{with_tests}
-%{_bindir}/phpunit --verbose \
- --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleColor/autoload.php
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleColor/autoload.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleColor/autoload.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
+ %{_bindir}/phpunit --verbose \
+ --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleColor/autoload.php
+fi
+exit $ret
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
@@ -133,5 +155,8 @@ cp -rp src/* %{buildroot}%{phpdir}/
%changelog
+* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 0.1-1
+- backport for remi repository
+
* Fri Jul 15 2016 Shawn Iwinski <shawn@iwin.ski> - 0.1-1
- Initial package