summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-navigation.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-navigation.spec')
-rw-r--r--php-zendframework-zend-navigation.spec85
1 files changed, 53 insertions, 32 deletions
diff --git a/php-zendframework-zend-navigation.spec b/php-zendframework-zend-navigation.spec
index 5d81263..f19bc62 100644
--- a/php-zendframework-zend-navigation.spec
+++ b/php-zendframework-zend-navigation.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.8.2
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -36,7 +36,7 @@ BuildArch: noarch
BuildRequires: php(language) >= 5.5
BuildRequires: php-pcre
BuildRequires: php-spl
-BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
# From composer, "require-dev": {
# "zendframework/zend-config": "^2.6",
# "zendframework/zend-console": "^2.6",
@@ -51,29 +51,29 @@ BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
# "zendframework/zend-view": "^2.6.5",
# "phpunit/phpunit": "^4.6",
# "zendframework/zend-coding-standard": "~1.0.0"
-BuildRequires: php-composer(%{gh_owner}/zend-config) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
-BuildRequires: php-composer(%{gh_owner}/zend-i18n) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-log) >= 2.7.1
-BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7
-BuildRequires: php-composer(%{gh_owner}/zend-router) >= 3.0
-BuildRequires: php-composer(%{gh_owner}/zend-permissions-acl) >= 2.6
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-composer(%{gh_owner}/zend-uri) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-view) >= 2.6.5
-BuildRequires: php-composer(phpunit/phpunit) >= 4.6
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-console) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
+BuildRequires: php-autoloader(%{gh_owner}/zend-i18n) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-log) >= 2.7.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-mvc) >= 2.7
+BuildRequires: php-autoloader(%{gh_owner}/zend-router) >= 3.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-permissions-acl) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-uri) >= 2.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.5
+BuildRequires: php-composer(phpunit/phpunit) >= 4.6
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.5 || ^7.0",
# "zendframework/zend-stdlib": "^2.7 || ^3.0"
Requires: php(language) >= 5.5
%if ! %{bootstrap}
-Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
# From composer, "suggest": {
# "zendframework/zend-config": "^2.6, to provide page configuration (optional, as arrays and Traversables are also allowed)",
# "zendframework/zend-permissions-acl": "^2.6, to provide ACL-based access restrictions to pages",
@@ -81,13 +81,15 @@ Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
# "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to use the navigation factories",
# "zendframework/zend-view": "^2.6.5, to use the navigation view helpers"
%if 0%{?fedora} >= 21
-Suggests: php-composer(%{gh_owner}/zend-config)
-Suggests: php-composer(%{gh_owner}/zend-permissions-acl)
-Suggests: php-composer(%{gh_owner}/zend-servicemanager)
-Suggests: php-composer(%{gh_owner}/zend-router)
-Suggests: php-composer(%{gh_owner}/zend-view)
+Suggests: php-autoloader(%{gh_owner}/zend-config)
+Suggests: php-autoloader(%{gh_owner}/zend-permissions-acl)
+Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
+Suggests: php-autoloader(%{gh_owner}/zend-router)
+Suggests: php-autoloader(%{gh_owner}/zend-view)
%endif
%endif
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.6.0
Requires: php-pcre
Requires: php-reflection
@@ -96,6 +98,7 @@ Requires: php-spl
Obsoletes: php-ZendFramework2-%{library} < 2.5
Provides: php-ZendFramework2-%{library} = %{version}
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%description
@@ -113,7 +116,20 @@ mv LICENSE.md LICENSE
%build
-# Empty build section, nothing required
+: Generate autoloader
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Zend/Stdlib/autoload.php',
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{php_home}/Zend/Config/autoload.php',
+ '%{php_home}/Zend/Permissions/Acl/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/Zend/Router/autoload.php',
+ '%{php_home}/Zend/View/autoload.php',
+]);
+EOF
%install
@@ -126,14 +142,16 @@ 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}/Zend/Console/autoload.php',
+ '%{php_home}/Zend/Http/autoload.php',
+ '%{php_home}/Zend/I18n/autoload.php',
+ '%{php_home}/Zend/Log/autoload.php',
+ '%{php_home}/Zend/Mvc/autoload.php',
+ '%{php_home}/Zend/Uri/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
EOF
ret=0
@@ -157,6 +175,9 @@ exit $ret
%changelog
+* Wed Dec 13 2017 Remi Collet <remi@remirepo.net> - 2.8.2-3
+- switch from zend-loader to fedora/autoloader
+
* Thu Mar 23 2017 Remi Collet <remi@remirepo.net> - 2.8.2-1
- Update to 2.8.2