From 8ad2f083f88aa177b4b982d86c320a58ea7b9c65 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 14:38:52 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-expressive-aurarouter.spec | 58 +++++++++++++---------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/php-zendframework-zend-expressive-aurarouter.spec b/php-zendframework-zend-expressive-aurarouter.spec index 9cc965a..12d3119 100644 --- a/php-zendframework-zend-expressive-aurarouter.spec +++ b/php-zendframework-zend-expressive-aurarouter.spec @@ -22,7 +22,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.0.0 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Aura.Router integration for %{library} Group: Development/Libraries @@ -37,18 +37,16 @@ BuildArch: noarch BuildRequires: php(language) >= 5.6 BuildRequires: php-composer(aura/router) >= 3.0 BuildRequires: php-composer(psr/http-message) >= 1.0 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 2.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 2.0 BuildRequires: php-composer(fig/http-message-util) >= 1.1 # From composer, "require-dev": { # "phpunit/phpunit": "^4.7 || ^5.6", # "zendframework/zend-coding-standard": "~1.0.0", # "malukenho/docheader": "^0.1.5" BuildRequires: php-composer(phpunit/phpunit) >= 4.7 -# Autoloader -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -# For dependencies autoloader -BuildRequires: php-zendframework-zend-loader >= 2.5.1-4 %endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", @@ -61,19 +59,19 @@ Requires: php-composer(aura/router) >= 3.0 Requires: php-composer(aura/router) < 4 Requires: php-composer(psr/http-message) >= 1.0 Requires: php-composer(psr/http-message) < 2 -Requires: php-composer(%{gh_owner}/zend-expressive-router) >= 2.0 -Requires: php-composer(%{gh_owner}/zend-expressive-router) < 3 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 2.0 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3 Requires: php-composer(fig/http-message-util) >= 1.1 Requires: php-composer(fig/http-message-util) < 2 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 1.0.0 # Nothing %if ! %{bootstrap} -# Autoloader -Requires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -Requires: php-zendframework-zend-loader >= 2.5.1-4 %endif Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} %description @@ -87,16 +85,29 @@ Documentation: http://zend-expressive.readthedocs.io/ mv LICENSE.md LICENSE -: Create dependency autoloader + +%build +: Create dependency autoloader - deprecated cat << 'EOF' | tee autoload.php array( - 'namespaces' => array( - 'ZendTest\\%{library}\\%{sublib}' => dirname(__DIR__).'/test/', - 'Zend\\%{library}\\%{sublib}' => '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}' -)))); -require_once '%{php_home}/Zend/autoload.php'; +require_once '%{buildroot}%{php_home}/Zend/%{library}/%{sublib}/aurarouter-autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\%{sublib}', dirname(__DIR__) . '/test'); EOF ret=0 @@ -140,11 +143,14 @@ exit $ret %license LICENSE %doc *.md %doc composer.json -%{php_home}/Zend/%{library}/%{sublib}/Aura* +%{php_home}/Zend/%{library}/%{sublib}/* %{php_home}/Zend/%{library}-%{sublib}-aura-autoload.php %changelog +* Mon Dec 11 2017 Remi Collet - 2.0.0-3 +- switch from zend-loader to fedora/autoloader + * Tue Feb 14 2017 Remi Collet - 2.0.0-1 - update to 2.0.0 - raise dependency on zend-expressive-router 2.0 -- cgit