summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-06 14:25:55 +0100
committerRemi Collet <remi@remirepo.net>2018-02-06 14:25:55 +0100
commit94dde7972c121decdc139bd8eff76ba43d63cbe6 (patch)
treec033ee6f8ab4598b2d8ea04e3b8f9fd86b43886c
parent096a39eb43c4dd51352ade09c83eca45eb54b210 (diff)
use range dependencies on F27+HEADmaster
-rw-r--r--.gitignore9
-rw-r--r--php-sebastian-object-enumerator.spec51
2 files changed, 30 insertions, 30 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-sebastian-object-enumerator.spec b/php-sebastian-object-enumerator.spec
index 0e40d38..6c7892a 100644
--- a/php-sebastian-object-enumerator.spec
+++ b/php-sebastian-object-enumerator.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-sebastian-object-enumerator
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -23,21 +23,23 @@
Name: php-sebastian-%{gh_project}
Version: 2.0.1
-%global specrel 1
+%global specrel 2
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Traverses array and object to enumerate all referenced objects
-Group: Development/Libraries
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.6
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: php-composer(sebastian/recursion-context) >= 1.0.4
+%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
# From composer.json"require-dev": {
# "phpunit/phpunit": "~5"
BuildRequires: php-composer(phpunit/phpunit) >= 5
@@ -47,8 +49,11 @@ BuildRequires: php-composer(phpunit/phpunit) >= 5
# "php": ">=5.6.0"
# "sebastian/recursion-context": "~2.0"
Requires: php(language) >= 5.6
-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 1.0.0:
Requires: php-reflection
Requires: php-spl
@@ -81,7 +86,6 @@ EOF
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}
@@ -92,36 +96,20 @@ mkdir vendor
%{_bindir}/phpab --template fedora --output vendor/autoload.php tests
: 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 || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
+ %{_bindir}/phpunit --verbose || ret=1
+ fi
+done
exit $ret
%else
: bootstrap build with test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.md composer.json
@@ -129,6 +117,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Feb 6 2018 Remi Collet <remi@remirepo.net> - 2.0.1-2
+- use range dependencies on F27+
+
* Sat Feb 18 2017 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
- update to 2.0.1