summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-paginator.spec73
1 files changed, 45 insertions, 28 deletions
diff --git a/php-zendframework-zend-paginator.spec b/php-zendframework-zend-paginator.spec
index 2caae2e..6a084ba 100644
--- a/php-zendframework-zend-paginator.spec
+++ b/php-zendframework-zend-paginator.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.8.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -35,7 +35,7 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 5.6
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": {
# "phpunit/phpunit": "^6.2.1 || ^5.7.15",
# "zendframework/zend-cache": "^2.6.1",
@@ -46,29 +46,29 @@ BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
# "zendframework/zend-json": "^2.6.1",
# "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
# "zendframework/zend-view": "^2.6.3"
-BuildRequires: php-composer(%{gh_owner}/zend-cache) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-config) >= 2.6.0
-BuildRequires: php-composer(%{gh_owner}/zend-db) >= 2.7
-BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-json) >= 2.6.1
-BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-composer(%{gh_owner}/zend-view) >= 2.6.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-cache) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-db) >= 2.7
+BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-autoloader(%{gh_owner}/zend-view) >= 2.6.3
%if 0%{?fedora} >= 26
%global phpunit %{_bindir}/phpunit6
%else
%global phpunit %{_bindir}/phpunit
%endif
-# Autoloader
-BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^7.0 || ^5.6",
# "zendframework/zend-stdlib": "^2.7 || ^3.0"
Requires: php(language) >= 5.6
%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-cache": "Zend\\Cache component to support cache features",
# "zendframework/zend-db": "Zend\\Db component",
@@ -77,20 +77,23 @@ Requires: php-composer(%{gh_owner}/zend-stdlib) < 4
# "zendframework/zend-servicemanager": "Zend\\ServiceManager component",
# "zendframework/zend-view": "Zend\\View component"
%if 0%{?fedora} >= 21
-Suggests: php-composer(%{gh_owner}/zend-cache)
-Suggests: php-composer(%{gh_owner}/zend-db)
-Suggests: php-composer(%{gh_owner}/zend-filter)
-Suggests: php-composer(%{gh_owner}/zend-json)
-Suggests: php-composer(%{gh_owner}/zend-servicemanager)
-Suggests: php-composer(%{gh_owner}/zend-view)
+Suggests: php-autoloader(%{gh_owner}/zend-cache)
+Suggests: php-autoloader(%{gh_owner}/zend-db)
+Suggests: php-autoloader(%{gh_owner}/zend-filter)
+Suggests: php-autoloader(%{gh_owner}/zend-json)
+Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
+Suggests: php-autoloader(%{gh_owner}/zend-view)
%endif
%endif
+# Autoloader
+Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.5.1
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
@@ -107,7 +110,21 @@ 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/View/autoload.php',
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{php_home}/Zend/Cache/autoload.php',
+ '%{php_home}/Zend/Db/autoload.php',
+ '%{php_home}/Zend/Filter/autoload.php',
+ '%{php_home}/Zend/Json/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/Zend/View/autoload.php',
+]);
+EOF
%install
@@ -120,14 +137,11 @@ 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/Config/autoload.php',
+]);
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
EOF
ret=0
@@ -152,6 +166,9 @@ exit $ret
%changelog
+* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 2.8.0-2
+- switch from zend-loader to fedora/autoloader
+
* Thu Nov 2 2017 Remi Collet <remi@remirepo.net> - 2.8.0-1
- Update to 2.8.0
- raise dependency on PHP 5.6