From 930292e0ef5666de86add39f6c232c3245643255 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 13 Oct 2016 17:49:47 +0200 Subject: php-sebastian-global-state: add optional dependency on uopz extension --- php-sebastian-global-state.spec | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'php-sebastian-global-state.spec') diff --git a/php-sebastian-global-state.spec b/php-sebastian-global-state.spec index 465c04e..935d404 100644 --- a/php-sebastian-global-state.spec +++ b/php-sebastian-global-state.spec @@ -20,7 +20,7 @@ Name: php-sebastian-global-state Version: 1.1.1 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Snapshotting of global state Group: Development/Libraries @@ -41,7 +41,11 @@ BuildRequires: php-composer(phpunit/phpunit) > 4.2 # from composer.json, "require": { # "php": ">=5.3.3" Requires: php(language) >= 5.3.3 -# Optional: php-pecl-uopz +# from composer.json, "suggest": { +# "ext-uopz": "*" +%if 0%{?fedora} > 21 +Suggests: php-uopz +%endif Provides: php-composer(sebastian/global-state) = %{version} @@ -77,10 +81,27 @@ require 'SebastianBergmann/GlobalState/autoload.php'; require 'tests/autoload.php'; EOF +: Run upstream test suite +# remirepo:13 +run=0 +ret=0 +if which php56; then + php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ + %{_bindir}/phpunit --bootstrap bs.php tests || ret=1 + run=1 +fi +if which php71; then + php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ + %{_bindir}/phpunit --bootstrap bs.php tests || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ -%{_bindir}/phpunit \ - --bootstrap bs.php \ - tests +%{_bindir}/phpunit --bootstrap bs.php --verbose tests +# remirepo:2 +fi +exit $ret + %else : bootstrap build with test suite disabled %endif @@ -98,8 +119,11 @@ rm -rf %{buildroot} %changelog +* Thu Oct 13 2016 Remi Collet - 1.1.1-3 +- add optional dependency on uopz extension + * Mon Oct 12 2015 Remi Collet - 1.1.1-1 - update to 1.1.1 * Fri Dec 5 2014 Remi Collet - 1.0.0-1 -- initial package \ No newline at end of file +- initial package -- cgit