diff options
author | Remi Collet <remi@remirepo.net> | 2021-03-24 08:43:58 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-03-24 08:43:58 +0100 |
commit | c1186950d2ed3110e0210ec2e268d65681bc634b (patch) | |
tree | 3962502ed3d44ef6e8f935d20a3d3e9dffd5921f /php-react-child-process.spec | |
parent | fe9c0df5d2b90fcb76a05db740332a46835f5e49 (diff) |
update to 0.6.2dev062
switch to phpunit9
sources from git snapshot
Diffstat (limited to 'php-react-child-process.spec')
-rw-r--r-- | php-react-child-process.spec | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/php-react-child-process.spec b/php-react-child-process.spec index ba69bb7..2c872aa 100644 --- a/php-react-child-process.spec +++ b/php-react-child-process.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-react-child-process # -# Copyright (c) 2017-2019 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2017-2021 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner reactphp %global github_name child-process -%global github_version 0.6.1 -%global github_commit 6895afa583d51dc10a4b9e93cd3bce17b3b77ac3 +%global github_version 0.6.2 +%global github_commit 70486012c0265264d2afa489ff32e7cdb76000d9 %global composer_vendor react %global composer_project child-process @@ -32,9 +32,9 @@ # "react/stream": "^1.0 || ^0.7.6" %global react_stream_min_ver 0.7.6 %global react_stream_max_ver 2.0 -# "sebastian/environment": "^3.0 || ^2.0 || ^1.0" +# "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" %global sebastian_environment_min_ver 1.0 -%global sebastian_environment_max_ver 4.0 +%global sebastian_environment_max_ver 6 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -48,14 +48,25 @@ Summary: Library for executing child processes License: MIT URL: https://reactphp.org/child-process/ -Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz + +# GitHub export does not include tests +# Run php-react-cache-get-source.sh to create full source +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit7 +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +# "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" +%global phpunit %{_bindir}/phpunit9 +BuildRequires: phpunit9 >= 9.3 +%else +%global phpunit %{_bindir}/phpunit +BuildRequires: php-phpunit-PHPUnit >= 4.8.35 +%endif %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver}) BuildRequires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver}) @@ -143,19 +154,15 @@ cp -rp src %{buildroot}%{phpdir}/React/ChildProcess %check %if %{with_tests} : Create tests bootstrap -cat <<'BOOTSTRAP' | tee bootstrap.php +mkdir vendor +cat <<'BOOTSTRAP' | tee vendor/autoload.php <?php require '%{buildroot}%{phpdir}/React/ChildProcess/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\ChildProcess\\', __DIR__.'/tests'); +\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\ChildProcess\\', dirname(__DIR__).'/tests'); \Fedora\Autoloader\Dependencies::required(array( '%{phpdir}/React/Socket/autoload.php', - array( - '%{phpdir}/SebastianBergmann/Environment3/autoload.php', - '%{phpdir}/SebastianBergmann/Environment2/autoload.php', - '%{phpdir}/SebastianBergmann/Environment/autoload.php', - ), )); BOOTSTRAP @@ -165,10 +172,10 @@ sed 's/function testProcessPidNotSameDueToShellWrapper/function SKIP_testProcess : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit7) -for PHP_EXEC in "" php71 php72 php73 php74; do - if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ +for CMDARG in "php %{phpunit}" "php72 %{_bindir}/phpunit" php73 php80; do + if which $CMDARG; then + set $CMDARG + $1 ${2:-%{_bindir}/phpunit9} --verbose \ || RETURN_CODE=1 fi done @@ -187,6 +194,11 @@ exit $RETURN_CODE %changelog +* Fri Feb 5 2021 Remi Collet <remi@remirepo.net> - 0.6.2-1 +- update to 0.6.2 +- switch to phpunit9 +- sources from git snapshot + * Sat Dec 14 2019 Shawn Iwinski <shawn@iwin.ski> - 0.6.1-1 - Update to 0.6.1 (RHBZ #1677881) - Use PHPUnit 7 |