summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-modulemanager.spec52
1 files changed, 39 insertions, 13 deletions
diff --git a/php-zendframework-zend-modulemanager.spec b/php-zendframework-zend-modulemanager.spec
index 8460b6b..b31c379 100644
--- a/php-zendframework-zend-modulemanager.spec
+++ b/php-zendframework-zend-modulemanager.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-zendframework-zend-modulemanager
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2019 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -21,10 +21,9 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.8.2
-Release: 2%{?dist}
+Release: 6%{?dist}
Summary: Zend Framework %{library} component
-Group: Development/Libraries
License: BSD
URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
@@ -35,9 +34,11 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 5.6
BuildRequires: php-spl
-BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
-BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
# From composer, "require-dev": {
# "zendframework/zend-console": "^2.6",
# "zendframework/zend-di": "^2.6",
@@ -46,18 +47,28 @@ BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
# "zendframework/zend-servicemanager": "^3.0.3 || ^2.7.5",
# "phpunit/phpunit": "^6.0.8 || ^5.7.15",
# "zendframework/zend-coding-standard": "~1.0.0"
+BuildRequires: (php-composer(%{gh_owner}/zend-console) >= 2.6 with php-composer(%{gh_owner}/zend-console) < 3)
+BuildRequires: (php-composer(%{gh_owner}/zend-di) >= 2.6 with php-composer(%{gh_owner}/zend-di) < 3)
+BuildRequires: (php-composer(%{gh_owner}/zend-loader) >= 2.5 with php-composer(%{gh_owner}/zend-loader) < 3)
+# ignore max version, test suite pass with 3.1
+BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7
+BuildRequires: (php-composer(%{gh_owner}/zend-servicemanager) >= 3.0.3 with php-composer(%{gh_owner}/zend-servicemanager) < 4)
+%global phpunit %{_bindir}/phpunit6
+# remirepo:11
+%else
+BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.6
BuildRequires: php-composer(%{gh_owner}/zend-di) >= 2.6
BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
BuildRequires: php-composer(%{gh_owner}/zend-mvc) >= 2.7
BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-%if 0%{?fedora} >= 26
-%global phpunit %{_bindir}/phpunit6
-%else
%global phpunit %{_bindir}/phpunit
%endif
BuildRequires: %{phpunit}
%endif
+# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
@@ -67,19 +78,27 @@ BuildRequires: php-fedora-autoloader-devel
# "zendframework/zend-stdlib": "^3.1 || ^2.7"
Requires: php(language) >= 5.6
%if ! %{bootstrap}
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-autoloader(%{gh_owner}/zend-config) >= 2.6 with php-autoloader(%{gh_owner}/zend-config) < 4)
+Requires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 3.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4)
+Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+# remirepo:8
+%else
Requires: php-autoloader(%{gh_owner}/zend-config) >= 2.6
Requires: php-autoloader(%{gh_owner}/zend-config) < 4
Requires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
Requires: php-autoloader(%{gh_owner}/zend-eventmanager) < 4
Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
+%endif
# From composer, "suggest": {
# "zendframework/zend-config": "Zend\\Config component",
# "zendframework/zend-console": "Zend\\Console component",
# "zendframework/zend-loader": "Zend\\Loader component if you are not using Composer autoloading for your modules",
# "zendframework/zend-mvc": "Zend\\Mvc component",
# "zendframework/zend-servicemanager": "Zend\\ServiceManager component"
-%if 0%{?fedora} >= 21
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Suggests: php-autoloader(%{gh_owner}/zend-console)
Suggests: php-autoloader(%{gh_owner}/zend-loader)
Suggests: php-autoloader(%{gh_owner}/zend-mvc)
@@ -121,7 +140,10 @@ mv LICENSE.md LICENSE
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Zend/Config/autoload.php',
+ [
+ '%{php_home}/Zend/Config3/autoload.php',
+ '%{php_home}/Zend/Config/autoload.php',
+ ],
'%{php_home}/Zend/EventManager/autoload.php',
'%{php_home}/Zend/Stdlib/autoload.php',
]);
@@ -145,7 +167,7 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-# For BR without new autoloader
+# For BC without new autoloader
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/Zend/Di/autoload.php',
'%{php_home}/Zend/autoload.php',
@@ -159,7 +181,7 @@ require_once __DIR__ . '/../test/TestAsset/ModuleAsClass.php';
EOF
ret=0
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
+for cmdarg in "php %{phpunit}" php70 php71 php72 php73; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
@@ -172,6 +194,7 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -180,6 +203,9 @@ exit $ret
%changelog
+* Thu Feb 28 2019 Remi Collet <remi@remirepo.net> - 2.8.2-6
+- use range dependencies
+
* Tue Dec 12 2017 Remi Collet <remi@remirepo.net> - 2.8.2-2
- switch from zend-loader to fedora/autoloader