summaryrefslogtreecommitdiffstats
path: root/php-bartlett-php-compatinfo-db.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-bartlett-php-compatinfo-db.spec')
-rw-r--r--php-bartlett-php-compatinfo-db.spec39
1 files changed, 18 insertions, 21 deletions
diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec
index 697d3ca..d253edf 100644
--- a/php-bartlett-php-compatinfo-db.spec
+++ b/php-bartlett-php-compatinfo-db.spec
@@ -7,12 +7,12 @@
# Please, preserve the changelog entries
#
# See https://github.com/llaville/php-compatinfo-db/releases
-%global gh_commit ff90705541e86c81b99053449b8b98841f0d4163
+%global gh_commit 878baf3857fcb01129963c510ac95a1fe0d3e54f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20151031
%global gh_owner llaville
%global gh_project php-compatinfo-db
-%global upstream_version 2.15.0
+%global upstream_version 2.16.0
#global upstream_prever RC1
# Namespace
%global ns_vendor Bartlett
@@ -40,8 +40,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Fix autoloader path
# Fix sqlite database path
-# Fix version and avoir jean85/pretty-package-versions (relying on composer.lock)
-Patch0: %{name}-2.0-rpm.patch
+# Fix version and avoir composer/package-versions-deprecated (relying on composer.lock)
+Patch0: %{name}-2.16-rpm.patch
# CURL_SSLVERSION constants have been backported
Patch1: %{name}-curltls.patch
@@ -52,14 +52,13 @@ BuildArch: noarch
BuildRequires: php(language) >= 7.1
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(composer/semver) >= 1.0 with php-composer(composer/semver) < 2)
+BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
BuildRequires: (php-composer(symfony/console) >= 4.4 with php-composer(symfony/console) < 6)
BuildRequires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2)
BuildRequires: (php-composer(laminas/laminas-diagnostics) >= 1.3 with php-composer(laminas/laminas-diagnostics) < 2)
-# remirepo:9
+# remirepo:8
%else
-BuildRequires: php-composer(composer/semver) < 2
-BuildRequires: php-composer(composer/semver) >= 1.0
+BuildRequires: php-composer-semver3
BuildRequires: php-symfony-console4 >= 4.4
BuildRequires: php-composer(league/tactician) < 2
BuildRequires: php-composer(league/tactician) >= 1.0
@@ -79,9 +78,6 @@ BuildRequires: php-pdo_sqlite
# For our patch / autoloader
BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require-dev": {
-# "psr/log": "^1.0",
-# "monolog/monolog": "^1.10",
-# "bartlett/phpunit-loggertestlistener": "^2.0",
# "phpunit/php-timer": "^2.0"
BuildRequires: php-cli
%if %{with tests}
@@ -90,7 +86,7 @@ BuildRequires: php-composer(phpunit/phpunit)
# From composer.json, "require"
# "php": "^7.1",
-# "composer/semver": "^1.0",
+# "composer/semver": "^1.0|^2.0|^3.0",
# "ext-curl": "*",
# "ext-intl": "*",
# "ext-libxml": "*",
@@ -100,19 +96,19 @@ BuildRequires: php-composer(phpunit/phpunit)
# "ext-json": "*",
# "ext-pdo_sqlite": "*",
# "symfony/console": "^4.4||^5.0",
-# "jean85/pretty-package-versions": "^1.3",
+# "composer/package-versions-deprecated": "^1.8",
# "league/tactician": "^1.0",
# "laminas/laminas-diagnostics": "^1.3"
Requires: php(language) >= 7.1
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(composer/semver) >= 1.0 with php-composer(composer/semver) < 2)
+Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
Requires: (php-composer(symfony/console) >= 4.4 with php-composer(symfony/console) < 6)
Requires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2)
Requires: (php-composer(laminas/laminas-diagnostics) >= 1.3 with php-composer(laminas/laminas-diagnostics) < 2)
-# remirepo:9
+# remirepo:8
%else
-Requires: php-composer(composer/semver) < 2
+Requires: php-composer-semver3
Requires: php-composer(composer/semver) >= 1.0
Requires: php-symfony-console4 >= 4.4
Requires: php-composer(league/tactician) < 2
@@ -149,10 +145,6 @@ Conflicts: php-bartlett-PHP-CompatInfo < 5
%patch0 -p1 -b .rpm
%patch1 -p0 -b .curltls
-# fix reported version
-sed -e '/VERSION/s/2.14.0/%{version}/' -i src/Presentation/Console/Application.php
-grep "%{version}" src/Presentation/Console/Application.php
-
cat << 'EOF' | tee src/autoload.php
<?php
/**
@@ -163,7 +155,7 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\CompatInfoDb\\', __DIR__);
\Fedora\Autoloader\Dependencies::required(array(
- '%{_datadir}/php/Composer/Semver/autoload.php',
+ '%{_datadir}/php/Composer/Semver3/autoload.php',
[
'%{_datadir}/php/Symfony5/Component/Console/autoload.php',
'%{_datadir}/php/Symfony4/Component/Console/autoload.php',
@@ -175,6 +167,7 @@ EOF
# Use package version
sed -e 's/@VERSION@/%{upstream_version}%{?upstream_prever}/' -i src/Presentation/Console/Application.php
+grep "%{version}" src/Presentation/Console/Application.php
# Cleanup patched files
find src -name \*rpm -delete -print
@@ -280,6 +273,10 @@ exit $ret
%changelog
+* Mon Jul 13 2020 Remi Collet <remi@remirepo.net> - 2.16.0-1
+- update to 2.16.0
+- switch to composer/semver 3
+
* Tue Jun 30 2020 Remi Collet <remi@remirepo.net> - 2.15.0-1
- update to 2.15.0