From 8fe965bb2411992956cc9fca58ac07490cc1581d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 14 May 2018 11:05:39 +0200 Subject: update to 3.1.0 use range dependencies on F27+ switch to phpunit6 or phpunit7 --- php-zendframework-zendservice-recaptcha.spec | 64 ++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 18 deletions(-) (limited to 'php-zendframework-zendservice-recaptcha.spec') diff --git a/php-zendframework-zendservice-recaptcha.spec b/php-zendframework-zendservice-recaptcha.spec index 06cf20c..e15191c 100644 --- a/php-zendframework-zendservice-recaptcha.spec +++ b/php-zendframework-zendservice-recaptcha.spec @@ -1,12 +1,12 @@ # remirepo/Fedora spec file for php-zendframework-zendservice-recaptcha # -# Copyright (c) 2015-2017 Remi Collet +# Copyright (c) 2015-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit 6c6877c07c8ac73b187911ea5d264a640b234361 +%global gh_commit 8caf28e3ab8c18d75534c0741ccd6949347d20e8 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project ZendService_ReCaptcha @@ -17,8 +17,8 @@ %global with_tests 0%{!?_without_tests:1} Name: php-%{gh_owner}-%{pk_project} -Version: 3.0.0 -Release: 5%{?dist} +Version: 3.1.0 +Release: 2%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -27,9 +27,6 @@ URL: https://framework.zend.com/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -# See https://github.com/zendframework/ZendService_ReCaptcha/pull/12 -Patch0: %{name}-pr12.patch - BuildArch: noarch # Tests %if %{with_tests} @@ -38,13 +35,31 @@ BuildRequires: php-json BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 # From composer.json, "require-dev": { -# "phpunit/phpunit": "^5.7 || ^6.0", +# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5", # "zendframework/zend-coding-standard": "~1.0.0", # "zendframework/zend-config": "^2.0", # "zendframework/zend-validator": "^2.8.2" -BuildRequires: php-composer(phpunit/phpunit) >= 5.7 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-json) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.0 with php-autoloader(%{gh_owner}/zend-config) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/zend-validator) >= 2.8.2 with php-autoloader(%{gh_owner}/zend-validator) < 3) +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.1.5 +# remirepo:12 +%else +BuildRequires: php-autoloader(%{gh_owner}/zend-http) < 3 +BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 +BuildRequires: php-autoloader(%{gh_owner}/zend-json) < 4 +BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-config) < 3 BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-validator) < 3 BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.8.2 +%global phpunit %{_bindir}/phpunit6 +BuildRequires: phpunit6 >= 6.5.8 +%endif %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -54,22 +69,27 @@ BuildRequires: php-fedora-autoloader-devel # "zendframework/zend-http": "^2.5.4", # "zendframework/zend-json": "^2.6.1 || ^3.0" Requires: php(language) >= 5.6 -Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3) +Requires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-json) < 4) +# remirepo:6 +%else Requires: php-autoloader(%{gh_owner}/zend-http) < 3 -Requires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 +Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 Requires: php-autoloader(%{gh_owner}/zend-json) < 4 +Requires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 +%endif # From compsoer, "suggest": { # "zendframework/zend-validator": "~2.0, if using ReCaptcha's Mailhide API" -%if 0%{?fedora} >= 21 Suggests: php-autoloader(%{gh_owner}/zend-validator) -%endif # Autoloader Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 3.0.0 (mcrypt is optional) Requires: php-json Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} -Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{pk_project}) = %{version} %description @@ -78,7 +98,6 @@ Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 mv LICENSE.md LICENSE @@ -128,9 +147,10 @@ require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php'; EOF ret=0 -for cmd in php php56 php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit --exclude online || ret=1 +for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit7} --exclude online --verbose || ret=1 fi done exit $ret @@ -150,6 +170,14 @@ exit $ret %changelog +* Mon May 14 2018 Remi Collet - 3.1.0-2 +- update to 3.1.0 +- use range dependencies on F27+ +- switch to phpunit6 or phpunit7 + +* Mon Dec 11 2017 Remi Collet - 3.0.0-6 +- fix virtual provide + * Sat Dec 9 2017 Remi Collet - 3.0.0-5 - switch from zend-loader to fedora/autoloader -- cgit