summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-06 08:24:45 +0100
committerRemi Collet <remi@remirepo.net>2018-02-06 08:24:45 +0100
commit25bd8eaba133ec72781c28f0d1a23076a14d8f11 (patch)
tree090db3b989ba69880dd3d7d254de1d0f92cb882b
parent526a5f4305ff2ec6a8e85646314d29d3b5c14f92 (diff)
use range dependencies on F27+
-rw-r--r--.gitignore9
-rw-r--r--php-phpunit-exporter.spec52
2 files changed, 32 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f69818
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.bz2
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-phpunit-exporter.spec b/php-phpunit-exporter.spec
index 3f69ee0..49f29de 100644
--- a/php-phpunit-exporter.spec
+++ b/php-phpunit-exporter.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-phpunit-exporter
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -22,7 +22,7 @@
Name: php-phpunit-exporter
Version: 2.0.0
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Export PHP variables for visualization
Group: Development/Libraries
@@ -30,7 +30,6 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3.3
BuildRequires: php-fedora-autoloader-devel
@@ -40,15 +39,22 @@ BuildRequires: php-fedora-autoloader-devel
# "ext-mbstring": "*"
BuildRequires: php-composer(phpunit/phpunit) >= 4.4
BuildRequires: php-mbstring
-BuildRequires: php-composer(sebastian/recursion-context) >= 2.0
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(sebastian/recursion-context) >= 2.0 with php-composer(sebastian/recursion-context) < 3)
+%else
+BuildRequires: php-sebastian-recursion-context
+%endif
%endif
# from composer.json
# "php": ">=5.3.3"
# "sebastian/recursion-context": "~2.0"
Requires: php(language) >= 5.3.3
-Requires: php-composer(sebastian/recursion-context) >= 2.0
-Requires: php-composer(sebastian/recursion-context) < 3
+%if 0%{?fedora} >= 27
+Requires: (php-composer(sebastian/recursion-context) >= 2.0 with php-composer(sebastian/recursion-context) < 3)
+%else
+Requires: php-sebastian-recursion-context
+%endif
# from phpcompatinfo report for version 2.0.0
Requires: php-mbstring
Requires: php-pcre
@@ -87,39 +93,25 @@ EOF
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/SebastianBergmann
cp -pr src %{buildroot}%{php_home}/SebastianBergmann/Exporter
%if %{with_tests}
%check
-# remirepo:13
-run=0
ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/Exporter/autoload.php || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/Exporter/autoload.php || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
-%{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/Exporter/autoload.php
-# remirepo:2
-fi
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d auto_prepend_file=%{buildroot}%{php_home}/SebastianBergmann/Exporter/autoload.php \
+ %{_bindir}/phpunit \
+ --bootstrap %{buildroot}%{php_home}/SebastianBergmann/Exporter/autoload.php \
+ --verbose || ret=1
+ fi
+done
exit $ret
%endif
-%clean
-rm -rf %{buildroot}
-
-
%post
if [ -x %{_bindir}/pear ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
@@ -128,7 +120,6 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.md
@@ -137,6 +128,9 @@ fi
%changelog
+* Tue Feb 6 2018 Remi Collet <remi@fedoraproject.org> - 2.0.0-4
+- use range dependencies on F27+
+
* Tue Nov 22 2016 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
- update to 2.0.0
- raise dependency on sebastian/recursion-context 2.0