summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-log.spec79
1 files changed, 49 insertions, 30 deletions
diff --git a/php-zendframework-zend-log.spec b/php-zendframework-zend-log.spec
index 91b0b89..35aeec0 100644
--- a/php-zendframework-zend-log.spec
+++ b/php-zendframework-zend-log.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.9.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -42,8 +42,8 @@ BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.5
BuildRequires: php-composer(psr/log) >= 1.0
# From composer, "require-dev": {
# "mikey179/vfsStream": "^1.6",
@@ -55,12 +55,12 @@ BuildRequires: php-composer(psr/log) >= 1.0
# "zendframework/zend-mail": "^2.6.1",
# "zendframework/zend-validator": "^2.6"
BuildRequires: php-composer(mikey179/vfsStream) >= 1.6
-BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-db) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-escaper) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-mail) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-console) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-db) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-escaper) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-mail) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.6
%if 0%{?fedora} >= 26
%global phpunit %{_bindir}/phpunit6
%else
@@ -68,10 +68,10 @@ BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.6
%endif
BuildRequires: %{phpunit}
# Optional dep
-BuildRequires: php-composer(%{gh_owner}/zend-mime) >= 2.5
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-mime) >= 2.5
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
@@ -82,10 +82,10 @@ Requires: php(language) >= 5.6
%if ! %{bootstrap}
Requires: php-composer(psr/log) >= 1.0
Requires: php-composer(psr/log) < 2
-Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4
-Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
# From composer, "suggest": {
# "ext-mongo": "mongo extension to use Mongo writer",
# "ext-mongodb": "mongodb extension to use MongoDB writer",
@@ -97,13 +97,15 @@ Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
%if 0%{?fedora} >= 21
Suggests: php-pecl(mongo)
Suggests: php-pecl(mongodb)
-Suggests: php-composer(%{gh_owner}/zend-console)
-Suggests: php-composer(%{gh_owner}/zend-db)
-Suggests: php-composer(%{gh_owner}/zend-escaper)
-Suggests: php-composer(%{gh_owner}/zend-mail)
-Suggests: php-composer(%{gh_owner}/zend-validator)
+Suggests: php-autoloader(%{gh_owner}/zend-console)
+Suggests: php-autoloader(%{gh_owner}/zend-db)
+Suggests: php-autoloader(%{gh_owner}/zend-escaper)
+Suggests: php-autoloader(%{gh_owner}/zend-mail)
+Suggests: php-autoloader(%{gh_owner}/zend-validator)
%endif
%endif
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.6.0
Requires: php-ctype
Requires: php-date
@@ -117,6 +119,7 @@ Obsoletes: php-ZendFramework2-%{library} < 2.5
Provides: php-ZendFramework2-%{library} = %{version}
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
Provides: php-composer(psr/log-implementation) = 1.0.0
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -135,7 +138,22 @@ mv LICENSE.md LICENSE
%build
-# Empty build section, nothing required
+: Create autoloader
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/Psr/Log/autoload.php',
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{php_home}/Zend/Console/autoload.php',
+ '%{php_home}/Zend/Db/autoload.php',
+ '%{php_home}/Zend/Escaper/autoload.php',
+ '%{php_home}/Zend/Mail/autoload.php',
+ '%{php_home}/Zend/Validator/autoload.php',
+]);
+EOF
%install
@@ -148,14 +166,12 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
-Zend\Loader\AutoloaderFactory::factory(array(
- 'Zend\Loader\StandardAutoloader' => array(
- 'namespaces' => array(
- 'ZendTest\\%{library}' => dirname(__DIR__).'/test/',
- 'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}'
-))));
-require_once '%{php_home}/Zend/autoload.php';
+require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/org/bovigo/vfs/autoload.php',
+ '%{php_home}/Zend/Filter/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
require __DIR__ . '/../autoload/phpunit.php';
require __DIR__ . '/../test/Writer/TestAsset/chmod.php';
@@ -186,6 +202,9 @@ exit $ret
%changelog
+* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 2.9.2-4
+- switch from zend-loader to fedora/autoloader
+
* Tue Oct 24 2017 Remi Collet <remi@remirepo.net> - 2.9.2-3
- fix FTBFS from Koschei, add patch for PHP 7.2 from
https://github.com/zendframework/zend-log/pull/79