summaryrefslogtreecommitdiffstats
path: root/php-pecl-redis6.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-redis6.spec')
-rw-r--r--php-pecl-redis6.spec84
1 files changed, 42 insertions, 42 deletions
diff --git a/php-pecl-redis6.spec b/php-pecl-redis6.spec
index de359c4..541c7fb 100644
--- a/php-pecl-redis6.spec
+++ b/php-pecl-redis6.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php-pecl-redis5
+# remirepo spec file for php-pecl-redis6
#
# Copyright (c) 2012-2023 Remi Collet
# License: CC-BY-SA-4.0
@@ -7,41 +7,38 @@
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
-%scl_package php-pecl-redis
+%scl_package php-pecl-redis
+%bcond_with tests
%else
+%bcond_without tests
%global _root_bindir %{_bindir}
%endif
-%global pecl_name redis
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%bcond_without tests
-%bcond_without igbinary
-%bcond_without msgpack
+%global pecl_name redis
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%bcond_without igbinary
+%bcond_without msgpack
# after 20-json, 40-igbinary and 40-msgpack
-%global ini_name 50-%{pecl_name}.ini
+%global ini_name 50-%{pecl_name}.ini
-%global upstream_version 5.3.7
-#global upstream_prever RC2
-%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
-%global _configure ../%{sources}/configure
+%global upstream_version 6.0.0
+%global upstream_prever RC1
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: Extension for communicating with the Redis key-value store
-Name: %{?scl_prefix}php-pecl-redis5
+Name: %{?scl_prefix}php-pecl-redis6
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/redis
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-Patch0: %{pecl_name}-tests.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.0
+# see https://github.com/phpredis/phpredis/pull/2367
+BuildRequires: %{?scl_prefix}php-devel >= 7.2
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with igbinary}
@@ -55,7 +52,7 @@ BuildRequires: pkgconfig(libzstd) >= 1.3.0
BuildRequires: pkgconfig(liblz4)
# to run Test suite
%if %{with tests}
-BuildRequires: redis >= 6
+BuildRequires: redis >= 7
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -74,17 +71,21 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 || "%{php_version}" > "7.4"
-Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5
+%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 || "%{php_version}" > "8.3"
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 6
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}4 < 6
Provides: %{?scl_prefix}php-pecl-%{pecl_name}4 = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release}
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}5 = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}5%{?_isa} = %{version}-%{release}
%else
# A single version can be installed
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 5
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 6
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}4 < 6
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6
%endif
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
@@ -123,13 +124,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests, license, and bundled library
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \
+ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-e '/liblzf/d' \
-i package.xml
cd %{sources}
-%patch -P0 -p1 -b.pr2335
-
# Use system library
rm -r liblzf
@@ -189,10 +188,11 @@ extension = %{pecl_name}.so
;redis.pconnect.pool_detect_dirty = 0
;redis.pconnect.pool_poll_timeout = 0
;redis.pconnect.pool_pattern => ''
-;redis.session.lock_expire = 0
-;redis.session.lock_retries = 10
-;redis.session.lock_wait_time = 2000
;redis.session.locking_enabled = 0
+;redis.session.lock_expire = 0
+;redis.session.lock_retries = 100
+;redis.session.lock_wait_time = 20000
+;redis.session.early_refresh = 0
EOF
@@ -258,15 +258,9 @@ done
%check
# simple module load test
DEPS="--no-php-ini"
-%if "%{php_version}" < "8.0"
-DEPS="$DEPS --define extension=json.so"
-%endif
-%if %{with igbinary}
-DEPS="$DEPS --define extension=igbinary.so"
-%endif
-%if %{with msgpack}
-DEPS="$DEPS --define extension=msgpack.so"
-%endif
+for i in json igbinary msgpack
+do [ -f %{php_extdir}/${i}.so ] && DEPS="$DEPS --define extension=${i}.so"
+done
%{__php} $DEPS \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -337,7 +331,7 @@ fi
%files
-%{?_licensedir:%license %{sources}/COPYING}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -351,6 +345,12 @@ fi
%changelog
+* Wed Aug 2 2023 Remi Collet <remi@remirepo.net> - 6.0.0~RC1-1
+- update to 6.0.0RC1
+- rename to php-pecl-redis6 for new API
+- disable test suite for SCL
+- open https://github.com/phpredis/phpredis/pull/2367 PHP 7.2 required
+
* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 5.3.7-4
- build out of sources tree