summaryrefslogtreecommitdiffstats
path: root/php-container-interop.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-container-interop.spec')
-rw-r--r--php-container-interop.spec35
1 files changed, 29 insertions, 6 deletions
diff --git a/php-container-interop.spec b/php-container-interop.spec
index cbe0f85..058f1a6 100644
--- a/php-container-interop.spec
+++ b/php-container-interop.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-container-interop
#
-# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2021 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -22,11 +22,18 @@
%global psr_container_min_ver 1.0
%global psr_container_max_ver 2.0
+# remirepo:5
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global with_range_dependencies 1
+%else
+%global with_range_dependencies 0
+%endif
+
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 13%{?github_release}%{?dist}
Summary: Promoting the interoperability of container objects (DIC, SL, etc.)
Group: Development/Libraries
@@ -38,16 +45,28 @@ BuildArch: noarch
# Tests
BuildRequires: php-cli
## composer.json
-BuildRequires: php-composer(psr/container) < %{psr_container_max_ver}
-BuildRequires: php-composer(psr/container) >= %{psr_container_min_ver}
+# remirepo:1
+%if %{with_range_dependencies}
+BuildRequires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver})
+# remirepo:4
+%else
+BuildRequires: php-psr-container < %{psr_container_max_ver}
+BuildRequires: php-psr-container >= %{psr_container_min_ver}
+%endif
## phpcompatinfo (computed from version 1.2.0)
BuildRequires: php(language) >= 5.3.0
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
# composer.json
-Requires: php-composer(psr/container) < %{psr_container_max_ver}
-Requires: php-composer(psr/container) >= %{psr_container_min_ver}
+# remirepo:1
+%if %{with_range_dependencies}
+Requires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver})
+# remirepo:4
+%else
+Requires: php-psr-container < %{psr_container_max_ver}
+Requires: php-psr-container >= %{psr_container_min_ver}
+%endif
# phpcompatinfo (computed from version 1.2.0)
Requires: php(language) >= 5.3.0
# Autoloader
@@ -123,6 +142,7 @@ exit (interface_exists("Interop\\Container\\ContainerInterface") ? 0 : 1);
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -133,6 +153,9 @@ exit (interface_exists("Interop\\Container\\ContainerInterface") ? 0 : 1);
%changelog
+* Wed Nov 10 2021 Remi Collet <remi@remirepo.net> - 1.2.0-13
+- use range dependencies
+
* Sun Apr 02 2017 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-3
- Add dependency version macros