From fd775cc9c73b30f985da4911cb2ad739e5d9da2e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 9 Dec 2017 16:12:16 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zendservice-recaptcha.spec | 65 +++++++++++++++++----------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/php-zendframework-zendservice-recaptcha.spec b/php-zendframework-zendservice-recaptcha.spec index ccdafb3..06cf20c 100644 --- a/php-zendframework-zendservice-recaptcha.spec +++ b/php-zendframework-zendservice-recaptcha.spec @@ -18,7 +18,7 @@ Name: php-%{gh_owner}-%{pk_project} Version: 3.0.0 -Release: 3%{?dist} +Release: 5%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -35,38 +35,41 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.6 BuildRequires: php-json -BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4 -BuildRequires: php-composer(%{gh_owner}/zend-json) >= 2.6.1 +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", # "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 -BuildRequires: php-composer(%{gh_owner}/zend-config) >= 2.0 -BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.8.2 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) +BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.8.2 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "zendframework/zend-http": "^2.5.4", # "zendframework/zend-json": "^2.6.1 || ^3.0" Requires: php(language) >= 5.6 -Requires: php-composer(%{gh_owner}/zend-http) >= 2.5.4 -Requires: php-composer(%{gh_owner}/zend-http) < 3 -Requires: php-composer(%{gh_owner}/zend-json) >= 2.6.1 -Requires: php-composer(%{gh_owner}/zend-json) < 4 +Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 +Requires: php-autoloader(%{gh_owner}/zend-http) < 3 +Requires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 +Requires: php-autoloader(%{gh_owner}/zend-json) < 4 # From compsoer, "suggest": { # "zendframework/zend-validator": "~2.0, if using ReCaptcha's Mailhide API" %if 0%{?fedora} >= 21 -Suggests: php-composer(%{gh_owner}/zend-validator) +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} %description @@ -79,7 +82,9 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} mv LICENSE.md LICENSE -# Generate autoloader for this framework extension + +%build +: Generate autoloader for this framework extension - deprecated cat << 'EOF' | tee autoload.php array( - 'namespaces' => array( - '%{namespace}\\%{library}' => '%{buildroot}%{php_home}/%{namespace}/%{library}', -)))); +require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/Zend/Config/autoload.php', + '%{php_home}/Zend/Validator/autoload.php', +]); +\Fedora\Autoloader\Autoload::addPsr4('ZendServiceTest\\%{library}\\', dirname(__DIR__) . '/test'); EOF ret=0 @@ -140,6 +150,9 @@ exit $ret %changelog +* Sat Dec 9 2017 Remi Collet - 3.0.0-5 +- switch from zend-loader to fedora/autoloader + * Thu Mar 2 2017 Remi Collet - 3.0.0-3 - add patch to skip online tests, from https://github.com/zendframework/ZendService_ReCaptcha/pull/12 -- cgit