From cfddc0249872e87d0aaceec4bbc5018d5d37d0f7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 16 Dec 2019 13:30:09 +0100 Subject: add I18n --- php-cakephp4.spec | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/php-cakephp4.spec b/php-cakephp4.spec index a11721a..368e015 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # -# TODO: Http, Form, I18n, ORM, Validation +# TODO: Http, Form, ORM, Validation # Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View # https://github.com/cakephp/cakephp/releases @@ -134,7 +134,7 @@ Requires: php-ctype Requires: php-date Requires: php-pcre Requires: php-spl -Provides: php-composer(%{pk_vendor}/chronos) = %{version} +Provides: php-composer(%{pk_vendor}/chronos) = %{chronos_version} %description chronos CakePHP Chronos Library: @@ -336,6 +336,41 @@ CakePHP FileSystem Library: CakePHP filesystem convenience classes to help you work with files and folders. +%package i18n +Summary: CakePHP I18n Library +# From composer.json "require": { +# "php": ">=7.2.0", +# "ext-intl": "*", +# "cakephp/core": "^4.0", +# "cakephp/chronos": "^2.0.0", +# "aura/intl": "^3.0.0" +Requires: php(language) >= 7.2 +Requires: php-intl +Requires: php-composer(%{pk_vendor}/core) = %{version} +Requires: php-composer(%{pk_vendor}/chronos) = %{chronos_version} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(aura/intl) >= 3.0.0 with php-composer(aura/intl) < 4) +Requires: (php-composer(aura/intl) >= 3.0.0 with php-composer(aura/intl) < 4) +%else +BuildRequires: php-aura-intl >= 3.0.0 +Requires: php-aura-intl >= 3.0.0 +%endif +# From phpcompatinfo report +Requires: php-date +Requires: php-pcre +Requires: php-spl +Provides: php-composer(%{pk_vendor}/i18n) = %{version} + +%description i18n +CakePHP I18n Library: + +The I18n library provides a `I18n` service locator that can be used for setting +the current locale, building translation bundles and translating messages. + +Additionally, it provides the `Time` and `Number` classes which can be used to +output dates, currencies and any numbers in the right format for the specified locale. + + %package log Summary: logging library # From composer.json "require": { @@ -536,6 +571,20 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; ]); EOF +: ===== Generate "i18n" autoloader +cat << 'EOF' | tee src/I18n/autoload.php + - 3.8.7-1 - update to 3.8.7 -- cgit