From b1d4ef9079e0c91f93acab4b15990602b1b07173 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Jan 2020 15:30:48 +0100 Subject: switch to Laminas --- php-laminas-xmlrpc.spec | 169 +++++++++++++++++++++++++++--------------------- 1 file changed, 97 insertions(+), 72 deletions(-) (limited to 'php-laminas-xmlrpc.spec') diff --git a/php-laminas-xmlrpc.spec b/php-laminas-xmlrpc.spec index 298a7e1..e2e112a 100644 --- a/php-laminas-xmlrpc.spec +++ b/php-laminas-xmlrpc.spec @@ -1,4 +1,4 @@ -# remirepo/Fedora spec file for php-zendframework-zend-xmlrpc +# remirepo/Fedora spec file for php-laminas-xmlrpc # # Copyright (c) 2015-2020 Remi Collet # License: CC-BY-SA @@ -7,11 +7,13 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 9765e67d957d5c929d25e5870c51ad93ea806f49 +%global gh_commit 1461f9777ec59f6c5dcbd727e23548ea1cbe4dcc %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-xmlrpc +%global gh_owner laminas +%global gh_project laminas-xmlrpc +%global zf_name zend-xmlrpc %global php_home %{_datadir}/php +%global namespace Laminas %global library XmlRpc %if %{bootstrap} %global with_tests 0%{?_with_tests:1} @@ -19,13 +21,13 @@ %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 2.9.0 Release: 1%{?dist} -Summary: Zend Framework %{library} component +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 @@ -41,73 +43,66 @@ BuildRequires: php-libxml BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-xmlwriter -# From composer, "require-dev": { -# "phpunit/PHPUnit": "^5.7.27 || ^6.5.8 || ^7.1.2", -# "zendframework/zend-coding-standard": "~1.0.0" # 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-math) >= 2.7 with php-autoloader(%{gh_owner}/zend-math) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zend-server) >= 2.7 with php-autoloader(%{gh_owner}/zend-server) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -BuildRequires: (php-autoloader(%{gh_owner}/zendxml) >= 1.0.2 with php-autoloader(%{gh_owner}/zendxml) < 2) -%global phpunit %{_bindir}/phpunit7 -BuildRequires: phpunit7 >= 7.1.2 -# remirepo:14 +BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.5.4 with php-autoloader(%{gh_owner}/laminas-http) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-math) >= 2.7 with php-autoloader(%{gh_owner}/laminas-math) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-server) >= 2.7 with php-autoloader(%{gh_owner}/laminas-server) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-xml) >= 1.0.2 with php-autoloader(%{gh_owner}/laminas-xml) < 2) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# From composer, "require-dev": { +# "laminas/laminas-coding-standard": "~1.0.0", +# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" +# remirepo:8 %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-math) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-math) >= 2.7 -BuildRequires: php-autoloader(%{gh_owner}/zend-server) < 3 -BuildRequires: php-autoloader(%{gh_owner}/zend-server) >= 2.7 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -BuildRequires: php-autoloader(%{gh_owner}/zendxml) < 2 -BuildRequires: php-autoloader(%{gh_owner}/zendxml) >= 1.0.2 -%global phpunit %{_bindir}/phpunit6 -BuildRequires: phpunit6 >= 6.5.8 +BuildRequires: php-laminas-http +BuildRequires: php-laminas-math +BuildRequires: php-laminas-server +BuildRequires: php-laminas-stdlib +BuildRequires: php-laminas-xml +BuildRequires: php-laminas-zendframework-bridge %endif +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.1.2 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", -# "zendframework/zend-http": "^2.5.4", -# "zendframework/zend-math": "^2.7 || ^3.0", -# "zendframework/zend-server": "^2.7", -# "zendframework/zend-stdlib": "^3.2.1", -# "zendframework/zendxml": "^1.0.2" +# "laminas/laminas-http": "^2.5.4", +# "laminas/laminas-math": "^2.7 || ^3.0", +# "laminas/laminas-server": "^2.7", +# "laminas/laminas-stdlib": "^3.2.1", +# "laminas/laminas-xml": "^1.0.2", +# "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-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3) -Requires: (php-autoloader(%{gh_owner}/zend-math) >= 2.7 with php-autoloader(%{gh_owner}/zend-math) < 4) -Requires: (php-autoloader(%{gh_owner}/zend-server) >= 2.7 with php-autoloader(%{gh_owner}/zend-server) < 3) -Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4) -Requires: (php-autoloader(%{gh_owner}/zendxml) >= 1.0.2 with php-autoloader(%{gh_owner}/zendxml) < 2) -# remirepo:12 +Requires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.5.4 with php-autoloader(%{gh_owner}/laminas-http) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-math) >= 3.0 with php-autoloader(%{gh_owner}/laminas-math) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-server) >= 2.7 with php-autoloader(%{gh_owner}/laminas-server) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-xml) >= 1.0.2 with php-autoloader(%{gh_owner}/laminas-xml) < 2) +Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# From composer, "suggest": { +# "laminas/laminas-cache": "To support Laminas\\XmlRpc\\Server\\Cache usage" +Suggests: php-autoloader(%{gh_owner}/laminas-cache) +# remirepo:8 %else -Requires: php-autoloader(%{gh_owner}/zend-http) < 3 -Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 -Requires: php-autoloader(%{gh_owner}/zend-math) < 4 -Requires: php-autoloader(%{gh_owner}/zend-math) >= 2.7 -Requires: php-autoloader(%{gh_owner}/zend-server) < 3 -Requires: php-autoloader(%{gh_owner}/zend-server) >= 2.7 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4 -Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 -Requires: php-autoloader(%{gh_owner}/zendxml) < 2 -Requires: php-autoloader(%{gh_owner}/zendxml) >= 1.0.2 +Requires: php-laminas-http +Requires: php-laminas-math +Requires: php-laminas-server +Requires: php-laminas-stdlib +Requires: php-laminas-xml +Requires: php-laminas-zendframework-bridge %endif -# From composer, "suggest": { -# "zendframework/zend-cache": "To support Zend\\XmlRpc\\Server\\Cache usage" -Suggests: php-autoloader(%{gh_owner}/zend-cache) %endif # Autoloader Requires: php-composer(fedora/autoloader) -# From phpcompatinfo report for version 2.5.2 +# From phpcompatinfo report for version 2.9.0 Requires: php-simplexml Requires: php-date Requires: php-dom @@ -117,10 +112,15 @@ Requires: php-pcre Requires: php-spl Requires: php-xmlwriter -Obsoletes: php-ZendFramework2-%{library} < 2.5 -Provides: php-ZendFramework2-%{library} = %{version} -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Obsoletes: php-ZendFramework2-%{library} < 2.5 +Provides: php-ZendFramework2-%{library} = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 2.9.0-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 @@ -129,10 +129,10 @@ using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.” -Zend\XmlRpc provides support for both consuming remote XML-RPC services and -building new XML-RPC servers. +%{namespace}\XmlRpc provides support for both consuming remote XML-RPC services +and building new XML-RPC servers. -Documentation: https://zendframework.github.io/%{gh_project}/ +Documentation: https://docs.laminas.dev/%{gh_project}/ %prep @@ -146,21 +146,35 @@ mv LICENSE.md LICENSE phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{php_home}/Zend/Http/autoload.php', - '%{php_home}/Zend/Math/autoload.php', - '%{php_home}/Zend/Server/autoload.php', - '%{php_home}/Zend/Stdlib/autoload.php', - '%{php_home}/ZendXml/autoload.php', + '%{php_home}/%{namespace}/Http/autoload.php', + '%{php_home}/%{namespace}/Math/autoload.php', + '%{php_home}/%{namespace}/Server/autoload.php', + '%{php_home}/%{namespace}/Stdlib/autoload.php', + '%{php_home}/%{namespace}/Xml/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ - '%{php_home}/Zend/Cache/autoload.php', + '%{php_home}/%{namespace}/Cache/autoload.php', +]); +EOF + +cat << 'EOF' | tee zf.php + - 2.9.0-1 +- switch to Laminas + * Fri Jan 3 2020 Remi Collet - 2.9.0-1 - update to 2.9.0 -- cgit