diff options
Diffstat (limited to 'php-pecl-redis6.spec')
-rw-r--r-- | php-pecl-redis6.spec | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/php-pecl-redis6.spec b/php-pecl-redis6.spec index 6544232..2445aaa 100644 --- a/php-pecl-redis6.spec +++ b/php-pecl-redis6.spec @@ -3,7 +3,7 @@ # # remirepo spec file for php-pecl-redis6 # -# Copyright (c) 2012-2023 Remi Collet +# Copyright (c) 2012-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -13,6 +13,11 @@ %bcond_without tests %bcond_without igbinary %bcond_without msgpack +%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10 +%bcond_without valkey +%else +%bcond_with valkey +%endif %global pecl_name redis %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -27,11 +32,13 @@ Summary: Extension for communicating with the Redis key-value store Name: php-pecl-redis6 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist} +Release: 2%{?dist} License: PHP-3.01 URL: https://pecl.php.net/package/redis Source0: https://pecl.php.net/get/%{sources}.tgz +Patch0: %{pecl_name}-upstream.patch + ExcludeArch: %{ix86} BuildRequires: make @@ -50,8 +57,12 @@ BuildRequires: pkgconfig(libzstd) >= 1.3.0 BuildRequires: pkgconfig(liblz4) # to run Test suite %if %{with tests} +%if %{with valkey} +BuildRequires: valkey >= 7 +%else BuildRequires: redis >= 7 %endif +%endif Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} @@ -68,7 +79,7 @@ Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} -%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 || "%{php_version}" > "8.3" +%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10 || "%{php_version}" > "8.4" Obsoletes: php-pecl-%{pecl_name} < 6 Provides: php-pecl-%{pecl_name} = %{version}-%{release} Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} @@ -105,6 +116,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd %{sources} +%patch -P0 -p1 + # Use system library rm -r liblzf @@ -248,14 +261,22 @@ done cd %{sources}/tests : Launch redis server +%if %{with valkey} +SRV=%{_bindir}/valkey-server +CLI=%{_bindir}/valkey-cli +%else +SRV=%{_bindir}/redis-server +CLI=%{_bindir}/redis-cli +%endif + mkdir -p data -pidfile=$PWD/redis.pid +pidfile=$PWD/server.pid port=$(%{__php} -r 'echo 9000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE;') -%{_bindir}/redis-server \ +$SRV \ --bind 127.0.0.1 \ --port $port \ --daemonize yes \ - --logfile $PWD/redis.log \ + --logfile $PWD/server.log \ --dir $PWD/data \ --pidfile $pidfile @@ -271,10 +292,10 @@ $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS TestRedis.php || ret=1 : Cleanup if [ -f $pidfile ]; then - %{_bindir}/redis-cli -p $port shutdown nosave + $CLI -p $port shutdown nosave sleep 2 fi -cat $PWD/redis.log +cat $PWD/server.log exit $ret %else @@ -296,6 +317,10 @@ exit $ret %changelog +* Thu Jul 11 2024 Remi Collet <remi@remirepo.net> - 6.0.2-2 +- use valkey on Fedora 41 +- add upstream patch for PHP 8.4 + * Mon Oct 23 2023 Remi Collet <remi@remirepo.net> - 6.0.2-1 - update to 6.0.2 |