# remirepo spec file for php-react-cache, from: # # Fedora spec file for php-react-cache # # Copyright (c) 2017-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner reactphp %global github_name cache %global github_version 1.1.1 %global github_commit 4bf736a2cccec7298bdf745db77585966fc2ca7e %global composer_vendor react %global composer_project cache # "php": ">=5.3.0", %global php_min_ver 5.3.0 # "react/promise": "^3.0 || ~2.0|~1.1" # ignore v3 not yet packaged %global react_promise_min_ver 1.1 %global react_promise_max_ver 3.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Async caching License: MIT URL: https://reactphp.org/cache/ # 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} %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(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) %else BuildRequires: php-react-promise < %{react_promise_max_ver} BuildRequires: php-react-promise >= %{react_promise_min_ver} %endif ## phpcompatinfo (computed from version 1.1.0) # ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json Requires: php(language) >= %{php_min_ver} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) %else Requires: php-react-promise < %{react_promise_max_ver} Requires: php-react-promise >= %{react_promise_min_ver} %endif # phpcompatinfo (computed from version 1.1.0) # # Autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description Promised cache interface. The cache component provides a promise-based cache interface and an in-memory ArrayCache implementation of that. This allows consumers to type hint against the interface and third parties to provide alternate implementations. Autoloader: %{phpdir}/React/Cache/autoload.php %prep %setup -qn %{github_name}-%{github_commit} %build : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 1.1.1-1 - update to 1.1.1 * Wed Nov 4 2020 Remi Collet - 1.1.0-1 - update to 1.1.0 - switch to phpunit9 * Sat Dec 14 2019 Shawn Iwinski - 1.0.0-1 - Update to 1.0.0 (RHBZ #1727191) - Use PHPUnit 6 * Sun Jul 01 2018 Shawn Iwinski - 0.5.0-1 - Update to 0.5.0 (RHBZ #1528619) - Add range version dependencies for Fedora >= 27 || RHEL >= 8 - Add composer.json to repo * Tue Jan 24 2017 Remi Collet - 0.4.1-2 - backport for remi repo * Mon Jan 23 2017 Shawn Iwinski - 0.4.1-2 - Retrict react/promise dependency to one major version - Minor update to SCL tests (only php54 and php55 if rhel) * Tue Jan 17 2017 Shawn Iwinski - 0.4.1-1 - Initial package