From 758f7193377edc170ef9190edc31957d9f782b45 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 10 Nov 2021 10:21:39 +0100 Subject: use range dependencies --- php-container-interop.spec | 35 +++++++++++++++++++++++++++++------ 1 file 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 +# Copyright (c) 2016-2021 Shawn Iwinski # # 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 - 1.2.0-13 +- use range dependencies + * Sun Apr 02 2017 Shawn Iwinski - 1.2.0-3 - Add dependency version macros -- cgit