diff options
-rw-r--r-- | php-react-child-process.spec | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/php-react-child-process.spec b/php-react-child-process.spec index dc44b8c..484fcb5 100644 --- a/php-react-child-process.spec +++ b/php-react-child-process.spec @@ -12,8 +12,8 @@ %global github_owner reactphp %global github_name child-process -%global github_version 0.6.4 -%global github_commit a778f3fb828d68caf8a9ab6567fd8342a86f12fe +%global github_version 0.6.5 +%global github_commit e71eb1aa55f057c7a4a0d08d06b0b0a484bead43 %global composer_vendor react %global composer_project child-process @@ -37,7 +37,7 @@ %global sebastian_environment_max_ver 6 # Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %{!?phpdir: %global phpdir %{_datadir}/php} @@ -56,7 +56,7 @@ Source1: %{name}-get-source.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} # "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" @@ -85,9 +85,9 @@ BuildRequires: php-composer(react/stream) >= %{react_stream_min_ver} BuildRequires: php-iconv BuildRequires: php-pcntl BuildRequires: php-spl -## Autoloader -BuildRequires: php-composer(fedora/autoloader) %endif +## Autoloader +BuildRequires: php-fedora-autoloader-devel # composer.json Requires: php(language) >= %{php_min_ver} @@ -123,21 +123,17 @@ Autoloader: %{phpdir}/React/ChildProcess/autoload.php %build : Create autoloader -cat <<'AUTOLOAD' | tee src/autoload.php -<?php -/** - * Autoloader for %{name} and its' dependencies - * (created by %{name}-%{version}-%{release}). - */ -require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; +phpab --template fedora \ + --output src/autoload.php \ + src -\Fedora\Autoloader\Autoload::addPsr4('React\\ChildProcess\\', __DIR__); +cat <<'AUTOLOAD' | tee -a src/autoload.php -\Fedora\Autoloader\Dependencies::required(array( +\Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Evenement/autoload.php', '%{phpdir}/React/EventLoop/autoload.php', '%{phpdir}/React/Stream/autoload.php', -)); +]); AUTOLOAD @@ -147,7 +143,7 @@ cp -rp src %{buildroot}%{phpdir}/React/ChildProcess %check -%if %{with_tests} +%if %{with tests} : Create tests bootstrap mkdir vendor cat <<'BOOTSTRAP' | tee vendor/autoload.php @@ -156,14 +152,14 @@ require '%{buildroot}%{phpdir}/React/ChildProcess/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\ChildProcess\\', dirname(__DIR__).'/tests'); -\Fedora\Autoloader\Dependencies::required(array( +\Fedora\Autoloader\Dependencies::required([ '%{phpdir}/React/Socket/autoload.php', -)); +]); BOOTSTRAP : Upstream tests RETURN_CODE=0 -for CMDARG in "php %{phpunit}" php73 php80; do +for CMDARG in "php %{phpunit}" php74 php80 php81 php82; do if which $CMDARG; then set $CMDARG $1 ${2:-%{_bindir}/phpunit9} --verbose \ @@ -186,6 +182,10 @@ exit $RETURN_CODE %changelog +* Fri Sep 23 2022 Remi Collet <remi@remirepo.net> - 0.6.5-1 +- update to 0.6.5 +- switch to classmap autoloader + * Tue Oct 12 2021 Remi Collet <remi@remirepo.net> - 0.6.4-1 - update to 0.6.4 |