From b30aa13801e3579e69bd168f8b6037dae91f605c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Sep 2020 08:55:31 +0200 Subject: sync with Fedora --- php-sentry.spec | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/php-sentry.spec b/php-sentry.spec index ec6aa98..d4de11b 100644 --- a/php-sentry.spec +++ b/php-sentry.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-sentry # -# Copyright (c) 2016-2018 Shawn Iwinski +# Copyright (c) 2016-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -22,16 +22,25 @@ %global php_min_ver 5.2.4 # "monolog/monolog": "*" # NOTE: Min version because autoloader required +# NOTE: Adding max version to force v1 %global monolog_min_ver 1.15.0 +%global monolog_max_ver 2 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} +# Range dependencies supported? +%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: 6%{?github_release}%{?dist} +Release: 11%{?github_release}%{?dist} Summary: PHP client for Sentry # ASL 2.0: @@ -54,8 +63,12 @@ BuildRequires: php-cli ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: php-composer(monolog/monolog) >= %{monolog_min_ver} BuildRequires: php-curl +%if %{with_range_dependencies} +BuildRequires: (php-composer(monolog/monolog) >= %{monolog_min_ver} with php-composer(monolog/monolog) < %{monolog_max_ver}) +%else +BuildRequires: php-Monolog >= %{monolog_min_ver} +%endif ## phpcompatinfo (computed from version 0.22.0) BuildRequires: php-date BuildRequires: php-hash @@ -73,8 +86,12 @@ Requires: php-cli Requires: ca-certificates # composer.json Requires: php(language) >= %{php_min_ver} -Requires: php-composer(monolog/monolog) >= %{monolog_min_ver} Requires: php-curl +%if %{with_range_dependencies} +Requires: (php-composer(monolog/monolog) >= %{monolog_min_ver} with php-composer(monolog/monolog) < %{monolog_max_ver}) +%else +Requires: php-Monolog >= %{monolog_min_ver} +%endif # phpcompatinfo (computed from version 0.22.0) Requires: php-date Requires: php-hash @@ -187,6 +204,9 @@ exit $ret %changelog +* Fri Sep 04 2020 Shawn Iwinski - 0.22.0-11 +- Add max Monolog version + * Thu Dec 6 2018 Remi Collet - 0.22.0-6 - skip test relying on uopz extension -- cgit