diff options
Diffstat (limited to 'php-theseer-autoload.spec')
-rw-r--r-- | php-theseer-autoload.spec | 79 |
1 files changed, 56 insertions, 23 deletions
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec index fe56b59..0c4a6cc 100644 --- a/php-theseer-autoload.spec +++ b/php-theseer-autoload.spec @@ -1,7 +1,7 @@ # remirepo/fedora spec file for php-theseer-autoload # -# Copyright (c) 2014-2020 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2014-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -10,7 +10,7 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit 9a5f7b0ded5377fb30bbd7d9f67d0cfd5a056698 +%global gh_commit 177e95d09f546f4dd44666e60ecdd868d0c24904 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner theseer %global gh_project Autoload @@ -18,12 +18,18 @@ %global pear_name Autoload %global pear_channel pear.netpirates.net +%if 0%{?fedora} +%bcond_without tests +%else +%bcond_with tests +%endif + Name: php-theseer-autoload -Version: 1.26.1 +Version: 1.28.0 Release: 1%{?dist} Summary: A tool and library to generate autoload code -License: BSD +License: BSD-3-Clause URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz @@ -31,31 +37,36 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Patch0: %{gh_project}-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 7.2 -%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 -%global phpunit %{_bindir}/phpunit9 -%else -%global phpunit %{_bindir}/phpunit8 -%endif +BuildRequires: php(language) >= 7.4 +BuildRequires: php-cli +BuildRequires: php-date +BuildRequires: php-json +BuildRequires: php-openssl +BuildRequires: php-phar +BuildRequires: php-spl +BuildRequires: php-tokenizer %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2) -BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7.1 with php-composer(zetacomponents/console-tools) < 2) +BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3.2 with php-composer(theseer/directoryscanner) < 2) +BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2) %else -BuildRequires: php-theseer-directoryscanner >= 1.3 -BuildRequires: php-zetacomponents-console-tools >= 1.7.1 +BuildRequires: php-theseer-directoryscanner >= 1.3.2 +BuildRequires: php-zetacomponents-console-tools >= 1.7 %endif +%if %{with tests} +%global phpunit %{_bindir}/phpunit9 BuildRequires: %{phpunit} +%endif # From composer.json, "require": { -# "theseer/directoryscanner": "^1.3", -# "zetacomponents/console-tools": "^1.7.1" +# "theseer/directoryscanner": "^1.3.3", +# "zetacomponents/console-tools": "^1.7.2" Requires: php(language) >= 5.3.1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2) -Requires: (php-composer(zetacomponents/console-tools) >= 1.7.1 with php-composer(zetacomponents/console-tools) < 2) +Requires: (php-composer(theseer/directoryscanner) >= 1.3.2 with php-composer(theseer/directoryscanner) < 2) +Requires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2) %else -Requires: php-theseer-directoryscanner >= 1.3 -Requires: php-zetacomponents-console-tools >= 1.7.1 +Requires: php-theseer-directoryscanner >= 1.3.2 +Requires: php-zetacomponents-console-tools >= 1.7 %endif # From phpcompatinfo report for version 1.25.0 Requires: php-cli @@ -80,7 +91,7 @@ the option of creating static require lists as well as phar archives. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p0 -b .rpm +%patch -P0 -p0 -b .rpm : drop composer dependencies sed -e '\:../vendor/:d' -i src/autoload.php @@ -114,6 +125,7 @@ sed -e 's:%{php_home}:%{buildroot}%{php_home}:' phpab.php >t.php php t.php --version | grep %{version} php t.php --output foo.php src +%if %{with tests} : Fix test suite to use installed library cat <<EOF | tee tests/init.php <?php @@ -121,13 +133,14 @@ require '%{buildroot}%{_datadir}/php/TheSeer/Autoload/autoload.php'; EOF ret=0 -for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do +for cmd in "php %{phpunit}" php80 php81 php82 php83; do if which $cmd; then set $cmd $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1 fi done exit $ret +%endif %pre @@ -146,6 +159,26 @@ fi %changelog +* Wed Jun 14 2023 Remi Collet <remi@remirepo.net> - 1.28.0-1 +- update to 1.28.0 + +* Fri Feb 17 2023 Remi Collet <remi@remirepo.net> - 1.27.2-1 +- update to 1.27.2 + +* Wed Jan 26 2022 Remi Collet <remi@remirepo.net> - 1.27.1-1 +- update to 1.27.1 + +* Mon Jan 24 2022 Remi Collet <remi@remirepo.net> - 1.27.0-1 +- update to 1.27.0 + +* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.26.3-2 +- disable test suite on EL + +* Mon Jul 26 2021 Remi Collet <remi@remirepo.net> - 1.26.3-1 +- update to 1.26.3 (no change) +- raise dependency on theseer/directoryscanner 1.3.3 +- raise dependency on zetacomponents/console-tools 1.7.2 + * Tue Jun 15 2021 Remi Collet <remi@remirepo.net> - 1.26.1-1 - update to 1.26.1 |