diff options
Diffstat (limited to 'php-bartlett-PHP-CompatInfo.spec')
-rw-r--r-- | php-bartlett-PHP-CompatInfo.spec | 248 |
1 files changed, 167 insertions, 81 deletions
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 9d6608f..eed0694 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,23 +1,24 @@ # remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2011-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # +# remirepo:2 # For compatibility with SCL %undefine __brp_mangle_shebangs %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 07bb648c3b0e853bac78e8e4b946a3aafa0271ac +%global gh_commit 9875282a35266aa2b66416303c06edcd70fc50a1 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -#global gh_date 20151005 +%global gh_date 2024-04-24 %global gh_owner llaville %global gh_project php-compatinfo -%global upstream_version 6.4.1 +%global upstream_version 7.1.4 #global upstream_prever RC1 Name: php-bartlett-PHP-CompatInfo @@ -25,7 +26,8 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run -License: BSD and MIT +# SPDX: see bundled libraries list below +License: BSD-3-Clause and MIT URL: https://github.com/llaville/php-compatinfo Source0: %{name}-%{version}-%{gh_short}.tgz # Script for fedora-review @@ -37,11 +39,11 @@ Source9: makesrc.sh Patch0: %{name}-6.0.0-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 7.4 +BuildRequires: php(language) >= 8.1 BuildRequires: php-cli BuildRequires: php-json -Requires: php(language) >= 7.4 +Requires: php(language) >= 8.1 Requires: php-cli Requires: php-dom Requires: php-json @@ -55,60 +57,59 @@ Requires: php-spl Requires: php-xmlreader # Bundled libraries -Provides: bundled(php-bartlett-php-compatinfo-db) = 4.2.0 -Provides: bundled(php-bartlett-sarif-php-sdk) = 1.0.1 -Provides: bundled(php-brick-math) = 0.9.3 -Provides: bundled(php-composer-semver) = 3.3.2 -Provides: bundled(php-doctrine-annotations) = 1.13.2 -Provides: bundled(php-doctrine-cache) = 2.1.1 -Provides: bundled(php-doctrine-collections) = 1.6.8 -Provides: bundled(php-doctrine-common) = 3.2.2 -Provides: bundled(php-doctrine-dbal) = 3.3.5 -Provides: bundled(php-doctrine-deprecations) = v0.5.3 -Provides: bundled(php-doctrine-event-manager) = 1.1.1 -Provides: bundled(php-doctrine-inflector) = 2.0.4 -Provides: bundled(php-doctrine-instantiator) = 1.4.1 -Provides: bundled(php-doctrine-lexer) = 1.2.3 -Provides: bundled(php-doctrine-orm) = 2.11.2 -Provides: bundled(php-doctrine-persistence) = 2.4.1 -Provides: bundled(php-nikic-php-parser) = v4.13.2 -Provides: bundled(php-psr-cache) = 1.0.1 -Provides: bundled(php-psr-container) = 1.1.2 +# License BSD-3-Clause +Provides: bundled(php-bartlett-php-compatinfo-db) = 6.5.0 +Provides: bundled(php-nikic-php-parser) = v5.0.2 +# License MIT +Provides: bundled(php-bartlett-sarif-php-sdk) = 1.1.0 +Provides: bundled(php-brick-math) = 0.11.0 +Provides: bundled(php-composer-semver) = 3.4.0 +Provides: bundled(php-doctrine-cache) = 2.2.0 +Provides: bundled(php-doctrine-collections) = 1.8.0 +Provides: bundled(php-doctrine-common) = 3.4.4 +Provides: bundled(php-doctrine-dbal) = 3.8.3 +Provides: bundled(php-doctrine-deprecations) = 1.1.3 +Provides: bundled(php-doctrine-event-manager) = 2.0.0 +Provides: bundled(php-doctrine-inflector) = 2.0.10 +Provides: bundled(php-doctrine-instantiator) = 2.0.0 +Provides: bundled(php-doctrine-lexer) = 3.0.1 +Provides: bundled(php-doctrine-orm) = 2.19.4 +Provides: bundled(php-doctrine-persistence) = 3.3.2 +Provides: bundled(php-psr-cache) = 3.0.0 +Provides: bundled(php-psr-clock) = 1.0.0 +Provides: bundled(php-psr-container) = 2.0.2 Provides: bundled(php-psr-event-dispatcher) = 1.0.0 -Provides: bundled(php-psr-log) = 1.1.4 -Provides: bundled(php-ramsey-collection) = 1.2.2 -Provides: bundled(php-ramsey-uuid) = 4.2.3 -Provides: bundled(php-symfony-amqp-messenger) = v5.4.5 -Provides: bundled(php-symfony-cache) = v5.4.7 -Provides: bundled(php-symfony-cache-contracts) = v2.5.1 -Provides: bundled(php-symfony-config) = v5.4.7 -Provides: bundled(php-symfony-console) = v5.4.7 -Provides: bundled(php-symfony-dependency-injection) = v5.4.7 -Provides: bundled(php-symfony-deprecation-contracts) = v2.5.1 -Provides: bundled(php-symfony-doctrine-messenger) = v5.4.7 -Provides: bundled(php-symfony-event-dispatcher) = v5.4.3 -Provides: bundled(php-symfony-event-dispatcher-contracts) = v2.5.1 -Provides: bundled(php-symfony-filesystem) = v5.4.7 -Provides: bundled(php-symfony-finder) = v5.4.3 -Provides: bundled(php-symfony-http-client) = v5.4.7 -Provides: bundled(php-symfony-http-client-contracts) = v2.5.1 -Provides: bundled(php-symfony-messenger) = v5.4.3 -Provides: bundled(php-symfony-polyfill-ctype) = v1.25.0 -Provides: bundled(php-symfony-polyfill-intl-grapheme) = v1.25.0 -Provides: bundled(php-symfony-polyfill-intl-normalizer) = v1.25.0 -Provides: bundled(php-symfony-polyfill-mbstring) = v1.25.0 -Provides: bundled(php-symfony-polyfill-php72) = v1.25.0 -Provides: bundled(php-symfony-polyfill-php73) = v1.25.0 -Provides: bundled(php-symfony-polyfill-php80) = v1.25.0 -Provides: bundled(php-symfony-polyfill-php81) = v1.25.0 -Provides: bundled(php-symfony-process) = v5.4.7 -Provides: bundled(php-symfony-redis-messenger) = v5.4.6 +Provides: bundled(php-psr-log) = 3.0.0 +Provides: bundled(php-ramsey-collection) = 2.0.0 +Provides: bundled(php-ramsey-uuid) = 4.7.5 +Provides: bundled(php-symfony-cache) = v6.4.6 +Provides: bundled(php-symfony-cache-contracts) = v3.4.2 +Provides: bundled(php-symfony-clock) = v6.4.5 +Provides: bundled(php-symfony-config) = v6.4.6 +Provides: bundled(php-symfony-console) = v6.4.6 +Provides: bundled(php-symfony-dependency-injection) = v6.4.6 +Provides: bundled(php-symfony-deprecation-contracts) = v3.4.0 +Provides: bundled(php-symfony-event-dispatcher) = v6.4.3 +Provides: bundled(php-symfony-event-dispatcher-contracts) = v3.4.2 +Provides: bundled(php-symfony-filesystem) = v6.4.6 +Provides: bundled(php-symfony-finder) = v6.4.0 +Provides: bundled(php-symfony-http-client) = v6.4.6 +Provides: bundled(php-symfony-http-client-contracts) = v3.4.2 +Provides: bundled(php-symfony-messenger) = v6.4.6 +Provides: bundled(php-symfony-polyfill-ctype) = v1.29.0 +Provides: bundled(php-symfony-polyfill-intl-grapheme) = v1.29.0 +Provides: bundled(php-symfony-polyfill-intl-normalizer) = v1.29.0 +Provides: bundled(php-symfony-polyfill-mbstring) = v1.29.0 +Provides: bundled(php-symfony-polyfill-php72) = v1.29.0 +Provides: bundled(php-symfony-polyfill-php80) = v1.29.0 +Provides: bundled(php-symfony-polyfill-php83) = v1.29.0 +Provides: bundled(php-symfony-process) = v6.4.4 Provides: bundled(php-symfony-requirements-checker) = v2.0.1 -Provides: bundled(php-symfony-serializer) = v5.4.7 -Provides: bundled(php-symfony-service-contracts) = v2.5.1 -Provides: bundled(php-symfony-stopwatch) = v5.4.5 -Provides: bundled(php-symfony-string) = v5.4.3 -Provides: bundled(php-symfony-var-exporter) = v5.4.7 +Provides: bundled(php-symfony-serializer) = v6.4.6 +Provides: bundled(php-symfony-service-contracts) = v3.4.2 +Provides: bundled(php-symfony-stopwatch) = v6.4.3 +Provides: bundled(php-symfony-string) = v6.4.4 +Provides: bundled(php-symfony-var-exporter) = v6.4.6 Provides: phpcompatinfo = %{version} Provides: php-composer(bartlett/php-compatinfo) = %{version} @@ -123,7 +124,8 @@ show content of dictionary references. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 -b .rpm +%patch -P0 -p1 -b .rpm +rm bin/*rpm # https://github.com/llaville/php-compatinfo-db/issues/112 sed -e 's/touch/@touch/' -i vendor/bartlett/php-compatinfo-db/config/set/default.php @@ -138,53 +140,61 @@ do [ -f vendor/$vendor/$proj/LICENSE ] && mv vendor/$vendor/$proj/LICENSE ${vendor}_${proj}_LICENSE done done -rm -r tests +rm -r vendor/bartlett/*/.github +rm -r vendor/bartlett/*/.changes : List bundled libraries and Licenses php -r ' - $pkgs = file_get_contents("vendor/composer/installed.json"); - $pkgs = json_decode($pkgs, true); - if (!is_array($pkgs) || !isset($pkgs["packages"])) { + $pkgs = file_get_contents("vendor/composer/installed.json"); + $pkgs = json_decode($pkgs, true); + if (!is_array($pkgs) || !isset($pkgs["packages"])) { echo "cant decode json file\n"; - exit(3); - } - $lic = []; + exit(3); + } + $res = []; foreach($pkgs["packages"] as $pkg) { - printf("Provides: bundled(php-%s) = %s\n", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]); - $lic = array_merge($lic, $pkg["license"]); - } - sort($lic); - printf("\nLicense: %s\n", implode(" and ", array_unique($lic)));' - + $lic = implode(" and ", $pkg["license"]); + if (!isset($res[$lic])) $res[$lic] = []; + $res[$lic][] = sprintf("Provides: bundled(php-%s) = %s", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]); + } + foreach($res as $lic => $lib) { + sort($lib); + printf("# License %s\n%s\n", $lic, implode("\n", $lib)); + } +' %build # Nothing %install -mkdir -p %{buildroot}%{_datadir} -cp -pr . %{buildroot}%{_datadir}/%{name} -rm %{buildroot}%{_datadir}/%{name}/*LICENSE +mkdir -p %{buildroot}%{_datadir}/%{name} +for i in bin config data resources src vendor composer.* +do cp -pr $i %{buildroot}%{_datadir}/%{name}/$i +done mkdir -p %{buildroot}%{_bindir} ln -s ../share/%{name}/bin/phpcompatinfo %{buildroot}%{_bindir}/phpcompatinfo mkdir -p %{buildroot}%{_mandir}/man1 mv %{buildroot}%{_datadir}/%{name}/bin/phpcompatinfo.1 \ - %{buildroot}%{_mandir}/man1/phpcompatinfo.1 + %{buildroot}%{_mandir}/man1/phpcompatinfo.1 -install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/fedora-review-check +install -D -p -m 755 %{SOURCE1} \ + %{buildroot}%{_datadir}/%{name}/fedora-review-check %check -%{buildroot}%{_bindir}/phpcompatinfo --version || grep %{version} +%{buildroot}%{_bindir}/phpcompatinfo --version | grep %{version} && exit 0 %files # remirepo:1 %{!?_licensedir:%global license %%doc} %license *LICENSE -%doc README.* +%doc *md +%doc docs +%doc examples %doc composer.json %doc vendor/composer/installed.json %{_bindir}/phpcompatinfo @@ -193,6 +203,82 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/fedora- %changelog +* Wed Apr 24 2024 Remi Collet <remi@remirepo.net> - 7.1.4-1 +- update to 7.1.4 +- update bundled bartlett/php-compatinfo-db to 6.5.0 + +* Tue Mar 19 2024 Remi Collet <remi@remirepo.net> - 7.1.3-1 +- update to 7.1.3 +- update bundled bartlett/php-compatinfo-db to 6.4.2 + +* Thu Feb 8 2024 Remi Collet <remi@remirepo.net> - 7.1.2-1 +- update to 7.1.2 +- update bundled bartlett/php-compatinfo-db to 6.2.1 + +* Thu Jan 18 2024 Remi Collet <remi@remirepo.net> - 7.1.1-1 +- update to 7.1.1 +- cleanup installation tree +- move docs and examples in package documentation + +* Tue Jan 2 2024 Remi Collet <remi@remirepo.net> - 7.1.0-1 +- update to 7.1.0 + +* Sat Dec 30 2023 Remi Collet <remi@remirepo.net> - 7.0.3-1 +- update to 7.0.3 +- update bundled bartlett/php-compatinfo-db to 6.1.1 + +* Wed Dec 6 2023 Remi Collet <remi@remirepo.net> - 7.0.2-1 +- update to 7.0.2 +- update bundled bartlett/php-compatinfo-db to 6.0.0 +- open https://github.com/llaville/php-compatinfo/issues/365 8.0 compatibility +- raise dependency on PHP 8.1 + +* Tue Nov 14 2023 Remi Collet <remi@remirepo.net> - 7.0.1-1 +- update to 7.0.1 +- update bundled bartlett/php-compatinfo-db to 5.13.0 + +* Mon Nov 13 2023 Remi Collet <remi@remirepo.net> - 7.0.0-4 +- add missing file for PHP 8.3 reported as + https://github.com/llaville/php-compatinfo/issues/364 + +* Mon Nov 13 2023 Remi Collet <remi@remirepo.net> - 7.0.0-3 +- update bundled bartlett/php-compatinfo-db to 5.12.0 + +* Tue May 16 2023 Remi Collet <remi@remirepo.net> - 7.0.0-1 +- update to 7.0.0 +- raise dependency on PHP 8.0 +- update bundled bartlett/php-compatinfo-db to 5.5.0 + +* Tue May 16 2023 Remi Collet <remi@remirepo.net> - 6.5.5-1 +- update to 6.5.5 + +* Tue Jan 10 2023 Remi Collet <remi@remirepo.net> - 6.5.4-2 +- update bundled bartlett/php-compatinfo-db to 4.11.0 + +* Wed Dec 14 2022 Remi Collet <remi@remirepo.net> - 6.5.4-1 +- update to 6.5.4 +- update bundled bartlett/php-compatinfo-db to 4.10.0 + +* Mon Nov 7 2022 Remi Collet <remi@remirepo.net> - 6.5.3-1 +- update to 6.5.3 +- update bundled bartlett/php-compatinfo-db to 4.8.0 + +* Tue Oct 25 2022 Remi Collet <remi@remirepo.net> - 6.5.2-1 +- update to 6.5.2 +- update bundled bartlett/php-compatinfo-db to 4.6.1 + +* Mon Oct 24 2022 Remi Collet <remi@remirepo.net> - 6.5.1-1 +- update to 6.5.1 + +* Mon Oct 24 2022 Remi Collet <remi@remirepo.net> - 6.5.0-1 +- update to 6.5.0 + +* Tue Sep 27 2022 Remi Collet <remi@remirepo.net> - 6.4.2-1 +- update to 6.4.2 + +* Wed Apr 20 2022 Remi Collet <remi@remirepo.net> - 6.4.1-2 +- update bundled bartlett/php-compatinfo-db to 4.2.0 + * Thu Apr 7 2022 Remi Collet <remi@remirepo.net> - 6.4.1-1 - update to 6.4.1 |