From 145a80bd619ec169d802efc4f975407613a4b09b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Jan 2020 15:32:38 +0100 Subject: switch to Laminas bootstrap build without laminas-mvc --- php-laminas-modulemanager.spec | 207 ++++++++++++++++++++++++----------------- 1 file changed, 120 insertions(+), 87 deletions(-) (limited to 'php-laminas-modulemanager.spec') diff --git a/php-laminas-modulemanager.spec b/php-laminas-modulemanager.spec index 1075ff1..41220ff 100644 --- a/php-laminas-modulemanager.spec +++ b/php-laminas-modulemanager.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-zendframework-zend-modulemanager +# remirepo/fedora spec file for php-laminas-modulemanager # # Copyright (c) 2015-2020 Remi Collet # License: CC-BY-SA @@ -6,26 +6,25 @@ # # Please, preserve the changelog entries # -%global bootstrap 0 -%global gh_commit b2596d24b9a4e36a3cd114d35d3ad0918db9a243 +# When build without laminas-mvc +%global bootstrap 1 +%global gh_commit 92b1cde1aab5aef687b863face6dd5d9c6751c78 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-modulemanager +%global gh_owner laminas +%global gh_project laminas-modulemanager +%global zf_name zend-modulemanager %global php_home %{_datadir}/php +%global namespace Laminas %global library ModuleManager -%if %{bootstrap} -%global with_tests 0%{?_with_tests:1} -%else %global with_tests 0%{!?_without_tests:1} -%endif -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 2.8.4 -Release: 2%{?dist} -Summary: Zend Framework %{library} component +Release: 1%{?dist} +Summary: %{namespace} Framework %{library} component License: BSD -URL: https://zendframework.github.io/%{gh_project}/ +URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh @@ -36,97 +35,103 @@ BuildRequires: php(language) >= 5.6 BuildRequires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) # From composer, "require-dev": { -# "zendframework/zend-console": "^2.6", -# "zendframework/zend-di": "^2.6", -# "zendframework/zend-loader": "^2.5", -# "zendframework/zend-mvc": "^3.0 || ^2.7", -# "zendframework/zend-servicemanager": "^3.0.3 || ^2.7.5", -# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16", -# "zendframework/zend-coding-standard": "~1.0.0" -BuildRequires: (php-composer(%{gh_owner}/zend-console) >= 2.6 with php-composer(%{gh_owner}/zend-console) < 3) -BuildRequires: (php-composer(%{gh_owner}/zend-di) >= 2.6 with php-composer(%{gh_owner}/zend-di) < 3) -BuildRequires: (php-composer(%{gh_owner}/zend-loader) >= 2.5 with php-composer(%{gh_owner}/zend-loader) < 3) +# "laminas/laminas-coding-standard": "~1.0.0", +# "laminas/laminas-console": "^2.6", +# "laminas/laminas-di": "^2.6", +# "laminas/laminas-loader": "^2.5", +# "laminas/laminas-mvc": "^3.0 || ^2.7", +# "laminas/laminas-servicemanager": "^3.0.3 || ^2.7.5", +# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16" +BuildRequires: (php-autoloader(%{gh_owner}/laminas-console) >= 2.6 with php-autoloader(%{gh_owner}/laminas-console) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-di) >= 2.6 with php-autoloader(%{gh_owner}/laminas-di) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-loader) >= 2.5 with php-autoloader(%{gh_owner}/laminas-loader) < 3) +%if ! %{bootstrap} # ignore max version, test suite pass with 3.1 -BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7 -BuildRequires: (php-composer(%{gh_owner}/zend-servicemanager) >= 3.0.3 with php-composer(%{gh_owner}/zend-servicemanager) < 4) -%global phpunit %{_bindir}/phpunit7 +BuildRequires: (php-autoloader(%{gh_owner}/laminas-mvc) >= 2.7 with php-autoloader(%{gh_owner}/laminas-mvc) < 4) +%endif +BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.0.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4) # remirepo:11 %else -BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6 -BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 -BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.6 -BuildRequires: php-composer(%{gh_owner}/zend-di) >= 2.6 -BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 -BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7 -BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5 -%global phpunit %{_bindir}/phpunit +BuildRequires: php-laminas-config +BuildRequires: php-laminas-eventmanager +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-zendframework-bridge +BuildRequires: php-laminas-console +BuildRequires: php-laminas-di +BuildRequires: php-laminas-loader +%if ! %{bootstrap} +BuildRequires: php-laminas-mvc +%endif +BuildRequires: php-laminas-servicemanager %endif -BuildRequires: %{phpunit} +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.5.16 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", -# "zendframework/zend-config": "^3.1 || ^2.6", -# "zendframework/zend-eventmanager": "^3.2 || ^2.6.3", -# "zendframework/zend-stdlib": "^3.1 || ^2.7" +# "laminas/laminas-config": "^3.1 || ^2.6", +# "laminas/laminas-eventmanager": "^3.2 || ^2.6.3", +# "laminas/laminas-stdlib": "^3.1 || ^2.7", +# "laminas/laminas-zendframework-bridge": "^1.0" Requires: php(language) >= 5.6 -%if ! %{bootstrap} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -# remirepo:8 -%else -Requires: php-autoloader(%{gh_owner}/zend-config) >= 2.6 -Requires: php-autoloader(%{gh_owner}/zend-config) < 4 -Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3 -Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -%endif +Requires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) # From composer, "suggest": { -# "zendframework/zend-config": "Zend\\Config component", -# "zendframework/zend-console": "Zend\\Console component", -# "zendframework/zend-loader": "Zend\\Loader component if you are not using Composer autoloading for your modules", -# "zendframework/zend-mvc": "Zend\\Mvc component", -# "zendframework/zend-servicemanager": "Zend\\ServiceManager component" -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 -Suggests: php-autoloader(%{gh_owner}/zend-console) -Suggests: php-autoloader(%{gh_owner}/zend-loader) -Suggests: php-autoloader(%{gh_owner}/zend-mvc) -Suggests: php-autoloader(%{gh_owner}/zend-servicemanager) -%endif +# "laminas/laminas-console": "Laminas\\Console component", +# "laminas/laminas-loader": "Laminas\\Loader component if you are not using Composer autoloading for your modules", +# "laminas/laminas-mvc": "Laminas\\Mvc component", +# "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" +Suggests: php-autoloader(%{gh_owner}/laminas-console) +Suggests: php-autoloader(%{gh_owner}/laminas-loader) +Suggests: php-autoloader(%{gh_owner}/laminas-mvc) +Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager) +# remirepo:6 +%else +Requires: php-laminas-config +Requires: php-laminas-eventmanager +Requires: php-laminas-stdlib +Requires: php-laminas-zendframework-bridge %endif # Autoloader Requires: php-composer(fedora/autoloader) -# From phpcompatinfo report for version 2.6.1 +# From phpcompatinfo report for version 2.8.4 Requires: php-spl -Obsoletes: php-ZendFramework2-%{library} < 2.5 -Provides: php-ZendFramework2-%{library} = %{version} +Obsoletes: php-ZendFramework2-%{library} < 2.5 +Provides: php-ZendFramework2-%{library} = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 2.8.4-99 +Provides: php-zendframework-%{zf_name} = %{version}-99 Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-composer(zendframework/%{zf_name}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} +Provides: php-autoloader(zendframework/%{zf_name}) = %{version} %description -Zend Framework 2.0 introduces a new and powerful approach to modules. +%{namespace} Framework introduces a new and powerful approach to modules. This new module system is designed with flexibility, simplicity, and re-usability in mind. A module may contain just about anything: PHP code, including MVC functionality; library code; view scripts; and/or public assets such as images, CSS, and JavaScript. The possibilities are endless. -Zend\ModuleManager is the component that enables the design of a module architecture for PHP applcations. +%{namespace}\ModuleManager is the component that enables the design of a module +architecture for PHP applcations. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -141,24 +146,38 @@ phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ [ - '%{php_home}/Zend/Config3/autoload.php', - '%{php_home}/Zend/Config/autoload.php', + '%{php_home}/%{namespace}/Config3/autoload.php', + '%{php_home}/%{namespace}/Config/autoload.php', ], - '%{php_home}/Zend/EventManager/autoload.php', - '%{php_home}/Zend/Stdlib/autoload.php', + '%{php_home}/%{namespace}/EventManager/autoload.php', + '%{php_home}/%{namespace}/Stdlib/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ - '%{php_home}/Zend/Console/autoload.php', - '%{php_home}/Zend/Loader/autoload.php', - '%{php_home}/Zend/Mvc/autoload.php', - '%{php_home}/Zend/ServiceManager/autoload.php', + '%{php_home}/%{namespace}/Console/autoload.php', + '%{php_home}/%{namespace}/Loader/autoload.php', + '%{php_home}/%{namespace}/Mvc/autoload.php', + '%{php_home}/%{namespace}/ServiceManager/autoload.php', ]); EOF +cat << 'EOF' | tee zf.php + - 2.8.4-1 +- switch to Laminas +- bootstrap build without laminas-mvc + * Mon Oct 28 2019 Remi Collet - 2.8.4-1 - update to 2.8.4 -- cgit