From 62cf0650130db011027ac9b4f4734db9a2737d25 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 Jan 2020 10:17:17 +0100 Subject: switch to Laminas use range dependencies --- php-laminas-mvc-form.spec | 138 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 97 insertions(+), 41 deletions(-) (limited to 'php-laminas-mvc-form.spec') diff --git a/php-laminas-mvc-form.spec b/php-laminas-mvc-form.spec index 1028b5e..b8a0009 100644 --- a/php-laminas-mvc-form.spec +++ b/php-laminas-mvc-form.spec @@ -1,68 +1,93 @@ -# remirepo/Fedora spec file for php-zendframework-zend-mvc-form +# remirepo/Fedora spec file for php-laminas-mvc-form # -# Copyright (c) 2016-2018 Remi Collet +# Copyright (c) 2016-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit 28bf47ce6661fd71f1b8d68f9b6bc8f841f6aeb0 +%global gh_commit 42254dd6d6d221f0825e79b1811bc734027908ed %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner zendframework -%global gh_project zend-mvc-form +%global gh_owner laminas +%global gh_project laminas-mvc-form +%global zf_name zend-mvc-form %global php_home %{_datadir}/php -%global library Form +%global namespace Laminas +%global library Mvc +%global subproj Form -Name: php-%{gh_owner}-%{gh_project} +Name: php-%{gh_project} Version: 1.0.0 -Release: 5%{?dist} -Summary: Zend Framework Mvc-Form component +Release: 1%{?dist} +Summary: %{namespace} Framework %{library}/%{subproj} component License: BSD -URL: https://framework.zend.com/ +URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch # For test BuildRequires: php-cli -BuildRequires: php-autoloader(%{gh_owner}/zend-code) >= 2.6.3 -BuildRequires: php-autoloader(%{gh_owner}/zend-form) >= 2.8.4 -BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.7.2 -# Because of polyfill -BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-autoloader(%{gh_owner}/laminas-code) >= 3.0.2 with php-autoloader(%{gh_owner}/laminas-code) < 4) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-form) >= 2.8.4 with php-autoloader(%{gh_owner}/laminas-form) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.7.2 with php-autoloader(%{gh_owner}/laminas-i18n) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# remirepo:6 +%else +BuildRequires: php-laminas-code +BuildRequires: php-laminas-form +BuildRequires: php-laminas-i18n +BuildRequires: php-laminas-zendframework-bridge +%endif # From composer, "require": { # "php": "^5.6 || ^7.0", -# "zendframework/zend-code": "^2.6.3 || ^3.0.2", -# "zendframework/zend-form": "^2.8.4", -# "zendframework/zend-i18n": "^2.7.2" +# "laminas/laminas-code": "^2.6.3 || ^3.0.2", +# "laminas/laminas-form": "^2.8.4", +# "laminas/laminas-i18n": "^2.7.2", +# "laminas/laminas-zendframework-bridge": "^1.0" Requires: php(language) >= 5.6 -Requires: php-autoloader(%{gh_owner}/zend-code) >= 2.6.3 -Requires: php-autoloader(%{gh_owner}/zend-code) < 4 -Requires: php-autoloader(%{gh_owner}/zend-form) >= 2.8.4 -Requires: php-autoloader(%{gh_owner}/zend-form) < 3 -Requires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.7.2 -Requires: php-autoloader(%{gh_owner}/zend-i18n) < 3 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-autoloader(%{gh_owner}/laminas-code) >= 3.0.2 with php-autoloader(%{gh_owner}/laminas-code) < 4) +Requires: (php-autoloader(%{gh_owner}/laminas-form) >= 2.8.4 with php-autoloader(%{gh_owner}/laminas-form) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.7.2 with php-autoloader(%{gh_owner}/laminas-i18n) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) +# remirepo:6 +%else +Requires: php-laminas-code +Requires: php-laminas-form +Requires: php-laminas-i18n +Requires: php-laminas-zendframework-bridge +%endif # Autoloader Requires: php-composer(fedora/autoloader) -Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +# Compatibily ensure by the bridge +Obsoletes: php-zendframework-%{zf_name} < 1.0.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 -zend-mvc-form is a metapackage that provides a single package for installing -all packages necessary to fully use zend-form under zend-mvc, including: +%{gh_project} is a metapackage that provides a single package for +installing all packages necessary to fully use laminas-form under laminas-mvc, +including: -* zendframework/zend-code -* zendframework/zend-form -* zendframework/zend-i18n +* laminas/laminas-code +* laminas/laminas-form +* laminas/laminas-i18n -i18n integration: this package only requires zend-i18n, and not zend-mvc-i18n. -This is to allow providing the bare minimum required to use zend-form, as its -base view helper extends from the base zend-i18n view helper. If you want to -provide translations for your form elements, please install zend-mvc-i18n as -well. +i18n integration: this package only requires laminas-i18n, and not +laminas-mvc-i18n. This is to allow providing the bare minimum required +to use laminas-form, as its base view helper extends from the base +laminas-i18n view helper. If you want to provide translations for your +form elements, please install laminas-mvc-i18n as well. %prep @@ -77,31 +102,62 @@ cat << 'EOF' | tee autoload.php - 1.0.0-1 +- switch to Laminas +- use range dependencies + * Tue Dec 12 2017 Remi Collet - 1.0.0-5 - switch from zend-loader to fedora/autoloader -- cgit