From 1104823abded7b49190e3ae2871ae3385bd3efce Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Dec 2017 14:46:28 +0100 Subject: switch from zend-loader to fedora/autoloader --- php-zendframework-zend-expressive-fastroute.spec | 63 +++++++++++++----------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/php-zendframework-zend-expressive-fastroute.spec b/php-zendframework-zend-expressive-fastroute.spec index a846ec9..0704446 100644 --- a/php-zendframework-zend-expressive-fastroute.spec +++ b/php-zendframework-zend-expressive-fastroute.spec @@ -22,7 +22,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: FastRoute integration for %{library} Group: Development/Libraries @@ -39,8 +39,8 @@ BuildRequires: php-composer(fig/http-message-util) >= 1.1.2 BuildRequires: php-composer(nikic/fast-route) >= 1.2 BuildRequires: php-composer(psr/container) >= 1.0 BuildRequires: php-composer(psr/http-message) >= 1.0.1 -BuildRequires: php-composer(%{gh_owner}/zend-expressive-router) >= 2.0 -BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 3.1 +BuildRequires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 2.0 +BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 BuildRequires: php-pcre # From composer, "require-dev": { # "malukenho/docheader": "^0.1.5", @@ -52,11 +52,9 @@ BuildRequires: php-pcre %global phpunit %{_bindir}/phpunit %endif BuildRequires: %{phpunit} -# 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", @@ -75,19 +73,17 @@ Requires: php-composer(psr/container) >= 1.0 Requires: php-composer(psr/container) < 2 Requires: php-composer(psr/http-message) >= 1.0.1 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-composer(%{gh_owner}/zend-stdlib) >= 3.1 -Requires: php-composer(%{gh_owner}/zend-stdlib) < 4 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) >= 2.0 +Requires: php-autoloader(%{gh_owner}/zend-expressive-router) < 3 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 +Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 +# Autoloader +Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 2.1.0 Requires: php-pcre -%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 @@ -102,6 +98,8 @@ https://zendframework.github.io/zend-expressive/features/router/fast-route/ mv LICENSE.md LICENSE + +%build : Create dependency autoloader 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}/fastroute-autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\%{sublib}', dirname(__DIR__) . '/test'); EOF ret=0 @@ -157,12 +156,16 @@ exit $ret %license LICENSE %doc *.md %doc composer.json -%{php_home}/Zend/%{library}/%{sublib}/Fast* +%{php_home}/Zend/%{library}/%{sublib}/FastRoute* +%{php_home}/Zend/%{library}/%{sublib}/fastroute* %{php_home}/Zend/%{library}-%{sublib}-fast-autoload.php %{php_home}/Zend/%{library}/%{sublib}/Exception/Invalid* %changelog +* Mon Dec 11 2017 Remi Collet - 2.1.2-2 +- switch from zend-loader to fedora/autoloader + * Thu Dec 7 2017 Remi Collet - 2.1.2-1 - Update to 2.1.2 (no change) -- cgit