From 033c62443c9047fa5c2ea1e64651bb84e87404a2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 3 Jul 2018 10:00:41 +0200 Subject: v1.5.0 from Fedora * Sun Jul 01 2018 Shawn Iwinski - 1.5.0-1 - Update to 1.5.0 (RHBZ #1480034) - Add range version dependencies for Fedora >= 27 || RHEL >= 8 - Add composer.json to repo --- .gitignore | 8 +++++++ composer.json | 11 +++++---- php-react-promise-timer.spec | 53 +++++++++++++++++++++++++++----------------- 3 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index b797318..a5ec626 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "react/promise-timer", - "description": "Trivial timeout implementation for Promises", + "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", "keywords": ["Promise", "timeout", "timer", "event-loop", "ReactPHP", "async"], - "homepage": "https://github.com/react/promise-timer", + "homepage": "https://github.com/reactphp/promise-timer", "license": "MIT", "authors": [ { @@ -19,7 +19,10 @@ }, "require": { "php": ">=5.3", - "react/event-loop": "~0.4.0|~0.3.0", - "react/promise": "~2.1|~1.2" + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", + "react/promise": "^2.7.0 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" } } diff --git a/php-react-promise-timer.spec b/php-react-promise-timer.spec index ee551f6..c3d4c73 100644 --- a/php-react-promise-timer.spec +++ b/php-react-promise-timer.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-react-promise-timer # -# Copyright (c) 2017 Shawn Iwinski +# Copyright (c) 2017-2018 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,20 +12,19 @@ %global github_owner reactphp %global github_name promise-timer -%global github_version 1.1.1 -%global github_commit ddedc67bfd7f579fc83e66ff67e3564b179297dd +%global github_version 1.5.0 +%global github_commit a11206938ca2394dc7bb368f5da25cd4533fa603 %global composer_vendor react %global composer_project promise-timer # "php": ">=5.3" %global php_min_ver 5.3 -# "react/event-loop": "~0.4.0|~0.3.0" -%global react_event_loop_min_ver 0.4.0 -%global react_event_loop_max_ver 1.0 -# "react/promise": "~2.1|~1.2" -# NOTE: Min version not 1.2 to restrict to one major version -%global react_promise_min_ver 2.1 +# "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5" +%global react_event_loop_min_ver 0.3.5 +%global react_event_loop_max_ver 2.0 +# "react/promise": "^2.7.0 || ^1.2.1" +%global react_promise_min_ver 1.2.1 %global react_promise_max_ver 3.0 # Build using "--without tests" to disable tests @@ -35,7 +34,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?github_release}%{?dist} +Release: 1%{?github_release}%{?dist} Summary: Trivial timeout implementation for Promises Group: Development/Libraries @@ -49,11 +48,16 @@ BuildArch: noarch ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver}) +BuildRequires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) +%else BuildRequires: php-composer(react/event-loop) < %{react_event_loop_max_ver} BuildRequires: php-composer(react/event-loop) >= %{react_event_loop_min_ver} BuildRequires: php-composer(react/promise) < %{react_promise_max_ver} BuildRequires: php-composer(react/promise) >= %{react_promise_min_ver} -## phpcompatinfo (computed from version 1.1.1) +%endif +## phpcompatinfo (computed from version 1.5.0) BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -61,11 +65,16 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver}) +Requires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) +%else Requires: php-composer(react/event-loop) < %{react_event_loop_max_ver} Requires: php-composer(react/event-loop) >= %{react_event_loop_min_ver} Requires: php-composer(react/promise) < %{react_promise_max_ver} Requires: php-composer(react/promise) >= %{react_promise_min_ver} -# phpcompatinfo (computed from version 1.1.1) +%endif +# phpcompatinfo (computed from version 1.5.0) Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -118,16 +127,15 @@ require '%{buildroot}%{phpdir}/React/Promise/Timer/autoload.php'; BOOTSTRAP : Upstream tests -%{_bindir}/phpunit --verbose --bootstrap bootstrap.php - -: Upstream tests with SCLs if available -SCL_RETURN_CODE=0 -for SCL in %{?rhel:php54 php55} php56 php70 php71; do - if which $SCL; then - $SCL %{_bindir}/phpunit --verbose --bootstrap bootstrap.php || SCL_RETURN_CODE=1 +RETURN_CODE=0 +PHPUNIT=$(which phpunit) +for PHP_EXEC in "" %{?rhel:php54 php55} php70 php71 php72 php73; do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then + $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ + || RETURN_CODE=1 fi done -exit $SCL_RETURN_CODE +exit $RETURN_CODE %else : Tests skipped %endif @@ -142,6 +150,11 @@ exit $SCL_RETURN_CODE %changelog +* Sun Jul 01 2018 Shawn Iwinski - 1.5.0-1 +- Update to 1.5.0 (RHBZ #1480034) +- Add range version dependencies for Fedora >= 27 || RHEL >= 8 +- Add composer.json to repo + * Tue Jan 24 2017 Remi Collet - 0.4.2-2 - backport for remi repo -- cgit