summaryrefslogtreecommitdiffstats
path: root/php-pecl-redis5.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-redis5.spec')
-rw-r--r--php-pecl-redis5.spec61
1 files changed, 33 insertions, 28 deletions
diff --git a/php-pecl-redis5.spec b/php-pecl-redis5.spec
index 848f2de..ddcbc82 100644
--- a/php-pecl-redis5.spec
+++ b/php-pecl-redis5.spec
@@ -19,43 +19,44 @@
%global pecl_name redis
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global with_tests 0%{!?_without_tests:1}
-%global with_igbin 1
+%bcond_without tests
+%bcond_without igbinary
# after 20-json, 40-igbinary and 40-msgpack
%global ini_name 50-%{pecl_name}.ini
-%global upstream_version 5.2.2
-#global upstream_prever RC2
+%global upstream_version 5.3.0
+%global upstream_prever RC1
Summary: Extension for communicating with the Redis key-value store
Name: %{?sub_prefix}php-pecl-redis5
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: https://pecl.php.net/package/redis
+Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-Patch0: https://patch-diff.githubusercontent.com/raw/phpredis/phpredis/pull/1750.patch
+Patch0: redis-lz4.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
-%if %{with_igbin}
+%if %{with igbinary}
BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
%endif
BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel >= 2.0.3
BuildRequires: liblzf-devel
BuildRequires: libzstd-devel >= 1.3.0
+BuildRequires: lz4-devel
# to run Test suite
-%if %{with_tests}
+%if %{with tests}
BuildRequires: redis >= 3
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
-%if %{with_igbin}
+%if %{with igbinary}
Requires: %{?scl_prefix}php-pecl(igbinary)%{?_isa}
%endif
Requires: %{?scl_prefix}php-pecl-msgpack%{?_isa}
@@ -188,6 +189,7 @@ extension = %{pecl_name}.so
;redis.pconnect.pooling_enabled = 1
;redis.pconnect.connection_limit = 0
;redis.pconnect.echo_check_liveness = 1
+;redis.pconnect.pool_pattern => ''
;redis.session.lock_expire = 0
;redis.session.lock_retries = 10
;redis.session.lock_wait_time = 2000
@@ -198,12 +200,11 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+peclconf() {
%configure \
--enable-redis \
--enable-redis-session \
-%if %{with_igbin}
+%if %{with igbinary}
--enable-redis-igbinary \
%endif
--enable-redis-msgpack \
@@ -211,24 +212,20 @@ cd NTS
--with-liblzf \
--enable-redis-zstd \
--with-libzstd \
- --with-php-config=%{_bindir}/php-config
+ --enable-redis-lz4 \
+ --with-liblz4 \
+ --with-php-config=$1
+}
+
+cd NTS
+%{_bindir}/phpize
+peclconf %{_bindir}/php-config
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
%{_bindir}/zts-phpize
-%configure \
- --enable-redis \
- --enable-redis-session \
-%if %{with_igbin}
- --enable-redis-igbinary \
-%endif
- --enable-redis-msgpack \
- --enable-redis-lzf \
- --with-liblzf \
- --enable-redis-zstd \
- --with-libzstd \
- --with-php-config=%{_bindir}/zts-php-config
+peclconf %{_bindir}/zts-php-config
make %{?_smp_mflags}
%endif
@@ -259,7 +256,7 @@ done
%check
# simple module load test
DEPS="--no-php-ini --define extension=json.so"
-%if %{with_igbin}
+%if %{with igbinary}
DEPS="$DEPS --define extension=igbinary.so"
%endif
DEPS="$DEPS --define extension=msgpack.so"
@@ -274,7 +271,7 @@ DEPS="$DEPS --define extension=msgpack.so"
--modules | grep %{pecl_name}
%endif
-%if %{with_tests}
+%if %{with tests}
cd NTS/tests
: Launch redis server
@@ -346,11 +343,19 @@ fi
%changelog
+* Fri Jun 26 2020 Remi Collet <remi@remirepo.net> - 5.3.0~RC1-1
+- update to 5.3.0RC1
+- enable lz4 compression support
+- drop patch merged upstream
+- add upstream patch to fix lz4 library name
+- add new option in provided configuration file
+
* Wed May 6 2020 Remi Collet <remi@remirepo.net> - 5.2.2-2
- test build for https://github.com/phpredis/phpredis/pull/1750
* Wed May 6 2020 Remi Collet <remi@remirepo.net> - 5.2.2-1
- update to 5.2.2
+- refresh options in provided configuration file
* Fri Mar 20 2020 Remi Collet <remi@remirepo.net> - 5.2.1-1
- update to 5.2.1