summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-23 11:23:46 +0100
committerRemi Collet <remi@remirepo.net>2018-03-23 11:23:46 +0100
commit067f000eba0e998aa67c22f6db8f48b5475e48c9 (patch)
tree1edfa4dc9b6842e295d93632fff436566d974ee5
parent839cbc89d469dd558e3387a9d736c22c1eabf9f7 (diff)
use range dependencies on F27+
-rw-r--r--php-mock2.spec28
1 files changed, 18 insertions, 10 deletions
diff --git a/php-mock2.spec b/php-mock2.spec
index 5462bdb..93d478e 100644
--- a/php-mock2.spec
+++ b/php-mock2.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-mock2
#
-# Copyright (c) 2016-2017 Remi Collet
+# Copyright (c) 2016-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -15,10 +15,9 @@
Name: php-mock%{major}
Version: 2.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: PHP-Mock can mock built-in PHP functions
-Group: Development/Libraries
License: WTFPL
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
@@ -28,9 +27,12 @@ BuildRequires: php(language) >= 5.6
%if %{with_tests}
# from composer.json, "require-dev": {
# "phpunit/phpunit": "^5.7"
-BuildRequires: php-composer(phpunit/php-text-template) < 2
-BuildRequires: php-composer(phpunit/php-text-template) >= 1
-BuildRequires: php-composer(phpunit/phpunit) > 5.7
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(phpunit/php-text-template) >= 1 with php-composer(phpunit/php-text-template) < 2)
+%else
+BuildRequires: php-phpunit-Text-Template
+%endif
+BuildRequires: php-phpunit-PHPUnit >= 5.7
%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -39,15 +41,18 @@ BuildRequires: php-composer(fedora/autoloader)
# "php": ">=5.6",
# "phpunit/php-text-template": "^1"
Requires: php(language) >= 5.6
-Requires: php-composer(phpunit/php-text-template) >= 1
-Requires: php-composer(phpunit/php-text-template) < 2
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(phpunit/php-text-template) >= 1 with php-composer(phpunit/php-text-template) < 2)
+%else
+Requires: php-phpunit-Text-Template
+%endif
# From phpcompatinfo report from version 2.0.0
Requires: php-date
Requires: php-reflection
Requires: php-spl
# For autoloader
Requires: php-composer(fedora/autoloader)
-%if 0%{?fedora} > 21
+%if 0%{?fedora} > 21 || 0%{?rhel} >= 8
# from composer.json, "suggest": {
# "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock."
Suggests: php-composer(php-mock/php-mock-phpunit)
@@ -106,7 +111,7 @@ cp -pr tests %{buildroot}%{_datadir}/tests/phpmock%{major}
%if %{with_tests}
# TODO: local build fails, build in mock is ok
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
$cmd %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/phpmock2/autoload.php --verbose || ret=1
fi
@@ -127,6 +132,9 @@ exit $ret
%changelog
+* Fri Mar 23 2018 Remi Collet <remi@remirepo.net> - 2.0.0-2
+- use range dependencies on F27+
+
* Tue Dec 5 2017 Remi Collet <remi@remirepo.net> - 2.0.0-1
- rename to php-mock2
- Update to 2.0.0