summaryrefslogtreecommitdiffstats
path: root/php-jakub-onderka-php-console-color.spec
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 /php-jakub-onderka-php-console-color.spec
parent53b8614cc88e0f37aca75d595b91743f594d8730 (diff)
php-jakub-onderka-php-console-color: backport
Diffstat (limited to 'php-jakub-onderka-php-console-color.spec')
-rw-r--r--php-jakub-onderka-php-console-color.spec29
1 files changed, 27 insertions, 2 deletions
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