summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-02-10 15:51:05 +0100
committerRemi Collet <remi@remirepo.net>2020-02-10 15:51:05 +0100
commit7c0216f8ab9c7896fced870bcd5669430654c449 (patch)
tree943bf9b7f26af5162dc95919a46c22de574d0f05
parent6eccc25d5c7df008f8f5ef0372c8d6283b91efed (diff)
add Form and ORM components
-rw-r--r--php-cakephp4.spec130
1 files changed, 125 insertions, 5 deletions
diff --git a/php-cakephp4.spec b/php-cakephp4.spec
index 341e317..77122d2 100644
--- a/php-cakephp4.spec
+++ b/php-cakephp4.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
-# TODO: Form, ORM
+# TODO:
# Auth, Command, Controller, Error, Mailer, Network, Routing, Shell, TestSuite, View
# https://github.com/cakephp/cakephp/releases
@@ -28,7 +28,7 @@
Name: php-%{pk_vendor}%{major}
Version: 4.0.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The CakePHP framework
License: MIT
@@ -348,6 +348,25 @@ CakePHP FileSystem Library:
CakePHP filesystem convenience classes to help you work with files and folders.
+%package form
+Summary: CakePHP Form Library
+# From composer.json "require": {
+# "php": ">=7.2.0",
+# "cakephp/event": "^4.0",
+# "cakephp/validation": "^4.0"
+Requires: php(language) >= 7.2
+Requires: php-composer(%{pk_vendor}/event) = %{version}
+Requires: php-composer(%{pk_vendor}/validation) = %{version}
+# From phpcompatinfo report
+Requires: php-hash
+Requires: php-json
+Requires: php-pcre
+Provides: php-composer(%{pk_vendor}/form) = %{version}
+
+%description form
+CakePHP Form Library:
+
+
%package http
Summary: CakePHP Http Library
# From composer.json "require": {
@@ -481,6 +500,39 @@ Provides: php-composer(%{pk_vendor}/log) = %{version}
CakePHP logging library with support for multiple different streams.
+%package orm
+Summary: CakePHP ORM Classes
+# From composer.json "require": {
+# "php": ">=7.2.0",
+# "cakephp/collection": "^4.0",
+# "cakephp/core": "^4.0",
+# "cakephp/datasource": "^4.0",
+# "cakephp/database": "^4.0",
+# "cakephp/event": "^4.0",
+# "cakephp/utility": "^4.0",
+# "cakephp/validation": "^4.0"
+Requires: php(language) >= 7.2
+Requires: php-composer(%{pk_vendor}/collection) = %{version}
+Requires: php-composer(%{pk_vendor}/core) = %{version}
+Requires: php-composer(%{pk_vendor}/datasource) = %{version}
+Requires: php-composer(%{pk_vendor}/database) = %{version}
+Requires: php-composer(%{pk_vendor}/event) = %{version}
+Requires: php-composer(%{pk_vendor}/utility) = %{version}
+Requires: php-composer(%{pk_vendor}/validation) = %{version}
+# From phpcompatinfo report
+Requires: php-reflection
+Requires: php-json
+Requires: php-pcre
+Requires: php-spl
+Provides: php-composer(%{pk_vendor}/orm) = %{version}
+
+%description orm
+CakePHP ORM Classes:
+
+CakePHP ORM - Provides a flexible and powerful ORM implementing
+a data-mapper pattern.
+
+
%package utility
Summary: CakePHP Utility Classes
# From composer.json "require": {
@@ -698,6 +750,18 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php';
]);
EOF
+: ===== Generate "form" autoloader
+cat << 'EOF' | tee src/Form/autoload.php
+<?php
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Cake\\Form\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required([
+ dirname(__DIR__) . '/Event/autoload.php',
+ dirname(__DIR__) . '/Validation/autoload.php',
+]);
+EOF
+
: ===== Generate "http" autoloader
cat << 'EOF' | tee src/Http/autoload.php
<?php
@@ -744,6 +808,23 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php';
]);
EOF
+: ===== Generate "orm" autoloader
+cat << 'EOF' | tee src/ORM/autoload.php
+<?php
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Cake\\ORM\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required([
+ dirname(__DIR__) . '/Collection/autoload.php',
+ dirname(__DIR__) . '/Core/autoload.php',
+ dirname(__DIR__) . '/Datasource/autoload.php',
+ dirname(__DIR__) . '/Database/autoload.php',
+ dirname(__DIR__) . '/Event/autoload.php',
+ dirname(__DIR__) . '/Utility/autoload.php',
+ dirname(__DIR__) . '/Validation/autoload.php',
+]);
+EOF
+
: ===== Generate "utility" autoloader
cat << 'EOF' | tee src/Utility/autoload.php
<?php
@@ -774,7 +855,9 @@ EOF
%install
#: Library
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}%{major}
-for dir in Cache Chronos Collection Console Core Database Datasource Event Filesystem Http I18n Log Utility Validation; do
+for dir in Cache Chronos Collection Console Core Database Datasource Event\
+ Filesystem Form Http I18n Log ORM Utility Validation
+do
cp -pr src/$dir %{buildroot}%{php_home}/%{ns_vendor}%{major}/
done
@@ -818,6 +901,10 @@ require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Filesystem/autoload.php";
exit (class_exists("Cake\\Filesystem\\File") ? 0 : 1);
'
php -r '
+require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Form/autoload.php";
+exit (class_exists("Cake\\Form\\Form") ? 0 : 1);
+'
+php -r '
require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Http/autoload.php";
exit (class_exists("Cake\\Http\\Server") ? 0 : 1);
'
@@ -830,6 +917,10 @@ require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Log/autoload.php";
exit (class_exists("Cake\\Log\\Log") ? 0 : 1);
'
php -r '
+require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/ORM/autoload.php";
+exit (class_exists("Cake\\ORM\\Behavior") ? 0 : 1);
+'
+php -r '
require "%{buildroot}%{php_home}/%{ns_vendor}%{major}/Utility/autoload.php";
exit (class_exists("Cake\\Utility\\Hash") ? 0 : 1);
'
@@ -845,21 +936,27 @@ ret=0
phpunit8 tests/TestCase/Cache --verbose || ret=1
phpunit8 tests2 --verbose || ret=1
phpunit8 tests/TestCase/Collection --verbose || ret=1
-phpunit8 tests/TestCase/Console --filter '^((?!(testDataAvailable)).)*$' --verbose || ret=1
+phpunit8 tests/TestCase/Console \
+ --filter '^((?!(testDataAvailable)).)*$' \
+ --verbose || ret=1
phpunit8 tests/TestCase/Core --verbose || ret=1
%if 0%{?rhel} == 6
: skip suite as sqlite is too old
%else
-phpunit8 tests/TestCase/Database --filter '^((?!(testMarshal)).)*$' --verbose || ret=1
+phpunit8 tests/TestCase/Database \
+ --filter '^((?!(testMarshal)).)*$' \
+ --verbose || ret=1
phpunit8 tests/TestCase/Datasource --verbose || ret=1
%endif
phpunit8 tests/TestCase/Event --verbose || ret=1
phpunit8 tests/TestCase/Filesystem --verbose || ret=1
+phpunit8 tests/TestCase/Form --verbose || ret=1
phpunit8 tests/TestCase/Http \
--filter '^((?!(CspMiddlewareTest)).)*$' \
--verbose || ret=1
phpunit8 tests/TestCase/I18n --verbose || ret=1
phpunit8 tests/TestCase/Log --verbose || ret=1
+phpunit8 tests/TestCase/ORM --verbose || ret=1
phpunit8 tests/TestCase/Utility --verbose || ret=1
# testEmailDeep is online
phpunit8 tests/TestCase/Validation \
@@ -959,6 +1056,16 @@ exit $ret
%exclude %{php_home}/%{ns_vendor}%{major}/Filesystem/composer.json
%exclude %{php_home}/%{ns_vendor}%{major}/Filesystem/LICENSE.txt
+%files form
+%{!?_licensedir:%global license %%doc}
+%license src/Form/LICENSE.txt
+%doc src/Form/composer.json
+%doc src/Form/*md
+ %{php_home}/%{ns_vendor}%{major}/Form
+%exclude %{php_home}/%{ns_vendor}%{major}/Form/*.md
+%exclude %{php_home}/%{ns_vendor}%{major}/Form/composer.json
+%exclude %{php_home}/%{ns_vendor}%{major}/Form/LICENSE.txt
+
%files http
%{!?_licensedir:%global license %%doc}
%license src/Http/LICENSE.txt
@@ -989,6 +1096,16 @@ exit $ret
%exclude %{php_home}/%{ns_vendor}%{major}/Log/composer.json
%exclude %{php_home}/%{ns_vendor}%{major}/Log/LICENSE.txt
+%files orm
+%{!?_licensedir:%global license %%doc}
+%license src/ORM/LICENSE.txt
+%doc src/ORM/composer.json
+%doc src/ORM/*md
+ %{php_home}/%{ns_vendor}%{major}/ORM
+%exclude %{php_home}/%{ns_vendor}%{major}/ORM/*.md
+%exclude %{php_home}/%{ns_vendor}%{major}/ORM/composer.json
+%exclude %{php_home}/%{ns_vendor}%{major}/ORM/LICENSE.txt
+
%files utility
%{!?_licensedir:%global license %%doc}
%license src/Utility/LICENSE.txt
@@ -1011,6 +1128,9 @@ exit $ret
%changelog
+* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 4.0.3-3
+- add Form and ORM components
+
* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 4.0.3-2
- use Chronos 2.0.2
- add Http component