From 02d9475fd43440f84a817e9181197374d09a144a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Sep 2020 10:50:14 +0200 Subject: v2.0.1 from Fedora --- php-consolidation-log.spec | 68 ++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/php-consolidation-log.spec b/php-consolidation-log.spec index ce793c7..e100f23 100644 --- a/php-consolidation-log.spec +++ b/php-consolidation-log.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-consolidation-log # -# Copyright (c) 2016-2019 Shawn Iwinski +# Copyright (c) 2016-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,35 +12,43 @@ %global github_owner consolidation %global github_name log -%global github_version 1.1.1 -%global github_commit b2e887325ee90abc96b0a8b7b474cd9e7c896e3a +%global github_version 2.0.1 +%global github_commit ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf %global composer_vendor consolidation %global composer_project log -# "php": ">=5.4.5" -%global php_min_ver 5.4.5 +# "php": ">=7.1.3" +%global php_min_ver 7.1.3 # "psr/log": "^1.0" # NOTE: Min version not 1.0 because autoloader required %global psr_log_min_ver 1.0.1 %global psr_log_max_ver 2.0 -# "symfony/console": "^2.8|^3|^4" -%global symfony_min_ver 2.8 -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -%global symfony_max_ver 5.0 -%else -%global symfony_max_ver 4.0 -%endif +# "symfony/console": "^4|^5" +%global symfony_min_ver 4.0 +%global symfony_max_ver 6.0 + +# "phpunit/phpunit": "^6" +%global phpunit_require phpunit6 +%global phpunit_min_ver 6 +%global phpunit_exec phpunit6 # 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_vendor}-%{composer_project} Version: %{github_version} Release: 1%{?github_release}%{?dist} -Summary: Improved Psr-3 / Psr\\Log logger based on Symfony Console components +Summary: Improved PSR-3 / Psr\\Log logger based on Symfony Console components License: MIT URL: https://github.com/%{github_owner}/%{github_name} @@ -51,16 +59,16 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: %{phpunit_require} >= %{phpunit_min_ver} +%if %{with_range_dependencies} BuildRequires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver}) BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) %else BuildRequires: php-composer(psr/log) < %{psr_log_max_ver} BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver} -BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} +BuildRequires: php-symfony4-console >= %{symfony_min_ver} %endif -## phpcompatinfo (computed from version 1.1.1) +## phpcompatinfo (computed from version 2.0.1) BuildRequires: php-pcre ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -68,16 +76,16 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +%if %{with_range_dependencies} Requires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver}) Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) %else -Requires: php-composer(psr/log) >= %{psr_log_min_ver} Requires: php-composer(psr/log) < %{psr_log_max_ver} -Requires: php-composer(symfony/console) < %{symfony_max_ver} +Requires: php-composer(psr/log) >= %{psr_log_min_ver} +Requires: php-symfony4-console >= %{symfony_min_ver} %endif -# phpcompatinfo (computed from version 1.1.1) -## +# phpcompatinfo (computed from version 2.0.1) +## none # Autoloader Requires: php-composer(fedora/autoloader) @@ -112,9 +120,8 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Psr/Log/autoload.php', [ + '%{phpdir}/Symfony5/Component/Console/autoload.php', '%{phpdir}/Symfony4/Component/Console/autoload.php', - '%{phpdir}/Symfony3/Component/Console/autoload.php', - '%{phpdir}/Symfony/Component/Console/autoload.php', ], ]); AUTOLOAD @@ -136,9 +143,9 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in php php71 php72 php73 php74; do - if [ "php" = "$PHP_EXEC" ] || which $PHP_EXEC; then +PHPUNIT=$(which %{phpunit_exec}) +for PHP_EXEC in "" php72 php73 php74; do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 fi @@ -159,6 +166,13 @@ exit $RETURN_CODE %changelog +* Mon Sep 07 2020 Shawn Iwinski - 2.0.1-1 +- Update to 2.0.1 (RHBZ #1850810) + +* Mon Feb 24 2020 Shawn Iwinski - 2.0.0-1 +- Update to 2.0.0 +- Use PHPUnit 6 + * Sat Jun 01 2019 Shawn Iwinski - 1.1.1-1 - Update to 1.1.1 (RHBZ #1582690) - Add range version dependencies for Fedora >= 27 || RHEL >= 8 -- cgit