summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-02-11 08:58:15 +0100
committerRemi Collet <remi@remirepo.net>2019-02-11 08:58:15 +0100
commit23a61a8217c9bc53ae3298e16b5aa33b18df29e2 (patch)
tree4cfecb6633f89338e6fd8ded2f2dc236633c228c
parent28c7cbb56e566a28deb3a35a1a7abb65296f5a5e (diff)
update to 3.7.4
add event subpackage use Chronos 1.2.4
-rwxr-xr-xmakesrc2.sh2
-rw-r--r--php-cakephp.spec79
-rw-r--r--src/Core/composer.json3
3 files changed, 78 insertions, 6 deletions
diff --git a/makesrc2.sh b/makesrc2.sh
index d538bb5..8cdfb70 100755
--- a/makesrc2.sh
+++ b/makesrc2.sh
@@ -16,7 +16,7 @@ git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
echo "Getting commit..."
pushd $PROJECT-$COMMIT
git checkout $COMMIT
-cp composer.json ../composer.json
+cp composer.json ../composer-chronos.json
popd
echo "Archiving..."
diff --git a/php-cakephp.spec b/php-cakephp.spec
index 65d4412..2c199fb 100644
--- a/php-cakephp.spec
+++ b/php-cakephp.spec
@@ -8,7 +8,7 @@
#
# https://github.com/cakephp/cakephp/releases
-%global gh_commit b0b9a3713720b30cd8e90c8b1a317a8294b2513a
+%global gh_commit 5c78a61c0ed7fbd56ce9d7cee3c6d6f9b27af46b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner cakephp
%global gh_project cakephp
@@ -18,12 +18,12 @@
%global with_tests 0%{!?_without_tests:1}
# https://github.com/cakephp/chronos/releases
-%global chronos_commit 395110125ff577f080fa064dca5c5608a4e77ee1
+%global chronos_commit ebda7326d4a65e53bc5bb915ebbbeee98f1926b0
%global chronos_short %(c=%{chronos_commit}; echo ${c:0:7})
-%global chronos_version 1.2.3
+%global chronos_version 1.2.4
Name: php-%{pk_vendor}
-Version: 3.7.3
+Version: 3.7.4
Release: 1%{?dist}
Summary: The CakePHP framework
@@ -146,6 +146,10 @@ Requires: php-json
Requires: php-mbstring
Requires: php-pcre
Requires: php-spl
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Recommends: php-composer(%{pk_vendor}/cache) = %{version}
+Recommends: php-composer(%{pk_vendor}/event) = %{version}
+%endif
Provides: php-composer(%{pk_vendor}/core) = %{version}
%description core
@@ -209,6 +213,11 @@ Requires: php-composer(%{pk_vendor}/core) = %{version}
# From phpcompatinfo report
Requires: php-json
Requires: php-spl
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Recommends: php-composer(%{pk_vendor}/utility) = %{version}
+Recommends: php-composer(%{pk_vendor}/collection) = %{version}
+Recommends: php-composer(%{pk_vendor}/cache) = %{version}
+%endif
Provides: php-composer(%{pk_vendor}/datasource) = %{version}
%description datasource
@@ -220,6 +229,23 @@ datasources and traits to help you quickly implement the interfaces
provided by this package.
+%package event
+Summary: CakePHP Event Library
+# From composer.json "require": {
+# "php": ">=5.6.0",
+# "cakephp/core": "^3.6.0"
+Requires: php(language) >= 5.6
+Requires: php-composer(%{pk_vendor}/core) = %{version}
+# From phpcompatinfo report
+Requires: php-pcre
+Requires: php-spl
+
+%description event
+CakePHP Event Library:
+
+CakePHP event dispatcher library that helps implementing the observer pattern.
+
+
%package log
Summary: logging library
# From composer.json "require": {
@@ -366,6 +392,17 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php';
]);
EOF
+: ===== Generate "event" autoloader
+cat << 'EOF' | tee src/Event/autoload.php
+<?php
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Cake\\Event\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required([
+ dirname(__DIR__) . '/Core/autoload.php',
+]);
+EOF
+
: ===== Generate "log" autoloader
cat << 'EOF' | tee src/Log/autoload.php
<?php
@@ -399,6 +436,7 @@ cp -pr src/Collection %{buildroot}%{php_home}/%{ns_vendor}/
cp -pr src/Core %{buildroot}%{php_home}/%{ns_vendor}/
cp -pr src/Database %{buildroot}%{php_home}/%{ns_vendor}/
cp -pr src/Datasource %{buildroot}%{php_home}/%{ns_vendor}/
+cp -pr src/Event %{buildroot}%{php_home}/%{ns_vendor}/
cp -pr src/Log %{buildroot}%{php_home}/%{ns_vendor}/
cp -pr src/Utility %{buildroot}%{php_home}/%{ns_vendor}/
@@ -427,6 +465,10 @@ require "%{buildroot}%{php_home}/%{ns_vendor}/Datasource/autoload.php";
exit (class_exists("Cake\\Datasource\\RulesChecker") ? 0 : 1);
'
php -r '
+require "%{buildroot}%{php_home}/%{ns_vendor}/Event/autoload.php";
+exit (class_exists("Cake\\Event\\Event") ? 0 : 1);
+'
+php -r '
require "%{buildroot}%{php_home}/%{ns_vendor}/Log/autoload.php";
exit (class_exists("Cake\\Log\\Log") ? 0 : 1);
'
@@ -446,6 +488,7 @@ phpunit tests/TestCase/Collection --verbose || ret=1
phpunit tests/TestCase/Database --filter '^((?!(testMarshal)).)*$' --verbose || ret=1
phpunit tests/TestCase/Datasource --verbose || ret=1
%endif
+phpunit tests/TestCase/Event --verbose || ret=1
phpunit tests/TestCase/Log --verbose || ret=1
phpunit tests/TestCase/Utility --verbose || ret=1
exit $ret
@@ -461,6 +504,7 @@ exit $ret
%doc src/Cache/*md
%{php_home}/%{ns_vendor}/Cache
%exclude %{php_home}/%{ns_vendor}/Cache/*.md
+%exclude %{php_home}/%{ns_vendor}/Cache/composer.json
%files collection
@@ -471,6 +515,8 @@ exit $ret
%dir %{php_home}/%{ns_vendor}
%{php_home}/%{ns_vendor}/Collection
%exclude %{php_home}/%{ns_vendor}/Collection/*.md
+%exclude %{php_home}/%{ns_vendor}/Collection/composer.json
+%exclude %{php_home}/%{ns_vendor}/Collection/LICENSE.txt
%files core
%{!?_licensedir:%global license %%doc}
@@ -480,6 +526,8 @@ exit $ret
%dir %{php_home}/%{ns_vendor}
%{php_home}/%{ns_vendor}/Core
%exclude %{php_home}/%{ns_vendor}/Core/*.md
+%exclude %{php_home}/%{ns_vendor}/Core/composer.json
+%exclude %{php_home}/%{ns_vendor}/Core/LICENSE.txt
%files database
%{!?_licensedir:%global license %%doc}
@@ -488,6 +536,8 @@ exit $ret
%doc src/Database/*md
%{php_home}/%{ns_vendor}/Database
%exclude %{php_home}/%{ns_vendor}/Database/*.md
+%exclude %{php_home}/%{ns_vendor}/Database/composer.json
+%exclude %{php_home}/%{ns_vendor}/Database/LICENSE.txt
%files datasource
%{!?_licensedir:%global license %%doc}
@@ -496,6 +546,18 @@ exit $ret
%doc src/Datasource/*md
%{php_home}/%{ns_vendor}/Datasource
%exclude %{php_home}/%{ns_vendor}/Datasource/*.md
+%exclude %{php_home}/%{ns_vendor}/Datasource/composer.json
+%exclude %{php_home}/%{ns_vendor}/Datasource/LICENSE.txt
+
+%files event
+%{!?_licensedir:%global license %%doc}
+%license src/Event/LICENSE.txt
+%doc src/Event/composer.json
+%doc src/Event/*md
+%{php_home}/%{ns_vendor}/Event
+%exclude %{php_home}/%{ns_vendor}/Event/*.md
+%exclude %{php_home}/%{ns_vendor}/Event/composer.json
+%exclude %{php_home}/%{ns_vendor}/Event/LICENSE.txt
%files log
%{!?_licensedir:%global license %%doc}
@@ -504,6 +566,8 @@ exit $ret
%doc src/Log/*md
%{php_home}/%{ns_vendor}/Log
%exclude %{php_home}/%{ns_vendor}/Log/*.md
+%exclude %{php_home}/%{ns_vendor}/Log/composer.json
+%exclude %{php_home}/%{ns_vendor}/Log/LICENSE.txt
%files utility
%{!?_licensedir:%global license %%doc}
@@ -512,9 +576,16 @@ exit $ret
%doc src/Utility/*md
%{php_home}/%{ns_vendor}/Utility
%exclude %{php_home}/%{ns_vendor}/Utility/*.md
+%exclude %{php_home}/%{ns_vendor}/Utility/composer.json
+%exclude %{php_home}/%{ns_vendor}/Utility/LICENSE.txt
%changelog
+* Mon Feb 11 2019 Remi Collet <remi@remirepo.net> - 3.7.4-1
+- update to 3.7.4
+- add event subpackage
+- use Chronos 1.2.4
+
* Tue Jan 22 2019 Remi Collet <remi@remirepo.net> - 3.7.3-1
- update to 3.7.3
diff --git a/src/Core/composer.json b/src/Core/composer.json
index 3a48585..0ee9afc 100644
--- a/src/Core/composer.json
+++ b/src/Core/composer.json
@@ -26,7 +26,8 @@
"cakephp/utility": "^3.6.0"
},
"suggest": {
- "cakephp/event": "To use PluginApplicationInterface or plugin applications."
+ "cakephp/event": "To use PluginApplicationInterface or plugin applications.",
+ "cakephp/cache": "To use Configure::store() and restore()."
},
"autoload": {
"psr-4": {