summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-23 11:27:03 +0100
committerRemi Collet <remi@remirepo.net>2018-03-23 11:27:03 +0100
commitd891f6575f6c8c0d70a8d35bc01194035da036ba (patch)
tree709ad32a2bc329eb88bdb41b3d7f3a25ab09927e
parent4a12a5d64075c4f74de78b5cdb52314ea5391c02 (diff)
use range dependencies on F27+
-rw-r--r--php-mock-integration2.spec34
1 files changed, 21 insertions, 13 deletions
diff --git a/php-mock-integration2.spec b/php-mock-integration2.spec
index 6b68366..b768094 100644
--- a/php-mock-integration2.spec
+++ b/php-mock-integration2.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-mock-integration2
#
-# 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-integration%{major}
Version: 2.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Integration package for PHP-Mock
-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,11 +27,14 @@ BuildRequires: php(language) >= 5.6
%if %{with_tests}
# from composer.json, "require-dev": {
# "phpunit/phpunit": "^4|^5"
-BuildRequires: php-composer(php-mock/php-mock) < 3
-BuildRequires: php-composer(php-mock/php-mock) >= 2
-BuildRequires: php-composer(phpunit/php-text-template) < 2
-BuildRequires: php-composer(phpunit/php-text-template) >= 1
-BuildRequires: php-composer(phpunit/phpunit) > 4
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(php-mock/php-mock) >= 2 with php-composer(php-mock/php-mock) < 3)
+BuildRequires: (php-composer(phpunit/php-text-template) >= 1 with php-composer(phpunit/php-text-template) < 2)
+%else
+BuildRequires: php-mock2
+BuildRequires: php-phpunit-Text-Template
+%endif
+BuildRequires: php-phpunit-PHPUnit
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -42,10 +44,13 @@ BuildRequires: php-composer(fedora/autoloader)
# "php-mock/php-mock": "^2",
# "phpunit/php-text-template": "^1"
Requires: php(language) >= 5.6
-Requires: php-composer(php-mock/php-mock) >= 2
-Requires: php-composer(php-mock/php-mock) < 3
-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(php-mock/php-mock) >= 2 with php-composer(php-mock/php-mock) < 3)
+Requires: (php-composer(phpunit/php-text-template) >= 1 with php-composer(phpunit/php-text-template) < 2)
+%else
+Requires: php-mock2
+Requires: php-phpunit-Text-Template
+%endif
# From phpcompatinfo report from version 2.0.0
# only core and standard
@@ -83,7 +88,7 @@ require_once '%{_datadir}/tests/phpmock%{major}/autoload.php';
EOF
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
%{_bindir}/phpunit --verbose || ret=1
fi
@@ -103,6 +108,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-mock-integration2
- Update to 2.0.0