From 22d845386efed534eba8fa540fc0256dd77b06db Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Jun 2019 15:35:54 +0200 Subject: - update to 5.0.0RC1 - rename to php-pecl-redis5 - raise dependency on PHP 7 - enable msgpack support - enable json support - update configuration for new options - open https://github.com/phpredis/phpredis/pull/1578 fix extension dependencies and report about json serializer --- php-pecl-redis5.spec | 90 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 34 deletions(-) (limited to 'php-pecl-redis5.spec') diff --git a/php-pecl-redis5.spec b/php-pecl-redis5.spec index b6308fa..32271e2 100644 --- a/php-pecl-redis5.spec +++ b/php-pecl-redis5.spec @@ -1,4 +1,4 @@ -# remirepo spec file for php-pecl-redis4 +# remirepo spec file for php-pecl-redis5 # # Copyright (c) 2012-2019 Remi Collet # License: CC-BY-SA @@ -21,30 +21,30 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global with_tests 0%{!?_without_tests:1} %global with_igbin 1 -%if "%{php_version}" < "5.6" -# after igbinary -%global ini_name %{pecl_name}.ini -%else -# after 40-igbinary +# after 20-json, 40-igbinary and 40-msgpack %global ini_name 50-%{pecl_name}.ini -%endif -%global upstream_version 4.3.0 -#global upstream_prever RC2 + +%global upstream_version 5.0.0 +%global upstream_prever RC1 Summary: Extension for communicating with the Redis key-value store -Name: %{?sub_prefix}php-pecl-redis4 +Name: %{?sub_prefix}php-pecl-redis5 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 3%{?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;')}} Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz License: PHP URL: http://pecl.php.net/package/redis BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-json %if %{with_igbin} BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel %endif +%ifnarch ppc64 +BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel >= 2.0.3 +%endif BuildRequires: liblzf-devel # to run Test suite %if %{with_tests} @@ -53,9 +53,13 @@ BuildRequires: redis >= 3 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?sub_prefix}php-json%{?_isa} %if %{with_igbin} Requires: %{?sub_prefix}php-pecl(igbinary)%{?_isa} %endif +%ifnarch ppc64 +Requires: %{?sub_prefix}php-pecl-msgpack%{?_isa} +%endif %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Obsoletes: %{?scl_prefix}php-%{pecl_name} < 3 @@ -64,32 +68,34 @@ 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} >= 29 || 0%{?rhel} >= 8 || "%{php_version}" > "7.3" -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 4 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 || "%{php_version}" > "7.4" +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5 +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5 Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %else # A single version can be installed -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 4 +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 5 +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5 %endif %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff %if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php71w-pecl-%{pecl_name}4 <= %{version} +Obsoletes: php71u-pecl-%{pecl_name} <= %{version} +Obsoletes: php71w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php72w-pecl-%{pecl_name}4 <= %{version} +Obsoletes: php72u-pecl-%{pecl_name} <= %{version} +Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name}4 <= %{version} +Obsoletes: php73-pecl-%{pecl_name} <= %{version} +Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name}4 <= %{version} +Obsoletes: php74-pecl-%{pecl_name} <= %{version} +Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -171,12 +177,13 @@ extension = %{pecl_name}.so ;redis.arrays.readtimeout = 0 ;redis.arrays.retryinterval = 0 ;redis.arrays.consistent = 0 +;redis.clusters.cache_slots = 0 ;redis.clusters.auth = 0 ;redis.clusters.persistent = 0 ;redis.clusters.read_timeout = 0 ;redis.clusters.seeds = '' ;redis.clusters.timeout = 0 -;redis.pconnect.pooling_enabled = 0 +;redis.pconnect.pooling_enabled = 1 ;redis.pconnect.connection_limit = 0 ;redis.session.locking_enabled = 0 ;redis.session.lock_expire = 0 @@ -195,6 +202,9 @@ cd NTS --enable-redis-session \ %if %{with_igbin} --enable-redis-igbinary \ +%endif +%ifnarch ppc64 + --enable-redis-msgpack \ %endif --enable-redis-lzf \ --with-liblzf \ @@ -209,6 +219,9 @@ cd ../ZTS --enable-redis-session \ %if %{with_igbin} --enable-redis-igbinary \ +%endif +%ifnarch ppc64 + --enable-redis-msgpack \ %endif --enable-redis-lzf \ --with-liblzf \ @@ -242,18 +255,20 @@ done %check # simple module load test -%{__php} --no-php-ini \ +DEPS="--no-php-ini --define extension=json.so" %if %{with_igbin} - --define extension=igbinary.so \ + DEPS="$DEPS --define extension=igbinary.so" +%endif +%ifnarch ppc64 + DEPS="$DEPS --define extension=msgpack.so" %endif + +%{__php} $DEPS \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} %if %{with_zts} -%{__ztsphp} --no-php-ini \ -%if %{with_igbin} - --define extension=igbinary.so \ -%endif +%{__ztsphp} $DEPS \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} %endif @@ -282,10 +297,7 @@ sed -e "s/6379/$port/" -i *.php ret=0 export TEST_PHP_EXECUTABLE=%{__php} -export TEST_PHP_ARGS="--no-php-ini \ -%if %{with_igbin} - --define extension=igbinary.so \ -%endif +export TEST_PHP_ARGS="$DEPS \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS TestRedis.php || ret=1 @@ -336,6 +348,16 @@ fi %changelog +* Thu Jun 20 2019 Remi Collet - 5.0.0~RC1-1 +- update to 5.0.0RC1 +- rename to php-pecl-redis5 +- raise dependency on PHP 7 +- enable msgpack support +- enable json support +- update configuration for new options +- open https://github.com/phpredis/phpredis/pull/1578 + fix extension dependencies and report about json serializer + * Wed May 29 2019 Remi Collet - 4.3.0-3 - rebuild -- cgit