summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--php-phpunit-comparator.spec48
2 files changed, 27 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-phpunit-comparator.spec b/php-phpunit-comparator.spec
index e775862..98a2b51 100644
--- a/php-phpunit-comparator.spec
+++ b/php-phpunit-comparator.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-phpunit-comparator
#
-# Copyright (c) 2014-2017 Remi Collet
+# Copyright (c) 2014-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -22,7 +22,7 @@
Name: php-phpunit-comparator
Version: 1.2.4
-Release: 1%{?dist}.1
+Release: 4%{?dist}
Summary: Compare PHP values for equality
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
@@ -45,10 +44,13 @@ BuildRequires: php-composer(phpunit/phpunit) >= 4.4
# "sebastian/diff": "~1.2",
# "sebastian/exporter": "~1.2 || ~2.0"
Requires: php(language) >= 5.3.3
-Requires: php-composer(sebastian/diff) >= 1.2
-Requires: php-composer(sebastian/diff) < 2
-Requires: php-composer(sebastian/exporter) >= 1.2
-Requires: php-composer(sebastian/exporter) < 3
+%if 0%{?fedora} >= 27
+Requires: (php-composer(sebastian/diff) >= 1.2 with php-composer(sebastian/diff) < 2)
+Requires: (php-composer(sebastian/exporter) >= 1.2 with php-composer(sebastian/exporter) < 3)
+%else
+Requires: php-phpunit-diff >= 1.2
+Requires: php-phpunit-exporter >= 1.2
+%endif
# from phpcompatinfo report for version 1.0.0
Requires: php-date
Requires: php-dom
@@ -85,7 +87,6 @@ EOF
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}
@@ -95,36 +96,20 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}
sed -e '/vendor/d' -i tests/bootstrap.php
sed -e '/log/d' phpunit.xml.dist >phpunit.xml
-# remirepo:13
run=0
-ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in php php56 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,-)
%doc README.md composer.json
%{!?_licensedir:%global license %%doc}
%license LICENSE
@@ -133,6 +118,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Feb 6 2018 Remi Collet <remi@fedoraproject.org> - 1.2.4-4
+- use range dependencies on F27+
+
* Tue Mar 14 2017 Remi Collet <remi@fedoraproject.org> - 1.2.4-1.1
- fix autoloader to rely on include_path for fedora/autoloader