summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-06-21 13:46:24 +0200
committerRemi Collet <remi@remirepo.net>2019-06-21 13:46:24 +0200
commite5c369d4facbfd77601c6475e7a9f342f573ae50 (patch)
treeb56e79604b29578fc73eefd300a63f54330b4f1b
parent22d845386efed534eba8fa540fc0256dd77b06db (diff)
cleanup for Fedora reviewfedora
-rw-r--r--php-pecl-redis5.spec152
1 files changed, 41 insertions, 111 deletions
diff --git a/php-pecl-redis5.spec b/php-pecl-redis5.spec
index 32271e2..d407736 100644
--- a/php-pecl-redis5.spec
+++ b/php-pecl-redis5.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-redis5
+# without SCL compatibility from:
+#
# remirepo spec file for php-pecl-redis5
#
# Copyright (c) 2012-2019 Remi Collet
@@ -10,40 +13,33 @@
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-redis
-%else
-%global _root_bindir %{_bindir}
-%endif
-
%global pecl_name redis
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%ifarch s390x
+%global with_tests 0%{?_with_tests:1}
+%else
%global with_tests 0%{!?_without_tests:1}
-%global with_igbin 1
+%endif
# after 20-json, 40-igbinary and 40-msgpack
%global ini_name 50-%{pecl_name}.ini
-
%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-redis5
+Name: php-pecl-redis5
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}
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 > 7
-BuildRequires: %{?scl_prefix}php-pear
-BuildRequires: %{?scl_prefix}php-json
-%if %{with_igbin}
-BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel
-%endif
+BuildRequires: gcc
+BuildRequires: php-devel > 7
+BuildRequires: php-pear
+BuildRequires: php-json
+BuildRequires: php-pecl-igbinary-devel
%ifnarch ppc64
-BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel >= 2.0.3
+BuildRequires: php-pecl-msgpack-devel >= 2.0.3
%endif
BuildRequires: liblzf-devel
# to run Test suite
@@ -51,58 +47,31 @@ BuildRequires: liblzf-devel
BuildRequires: redis >= 3
%endif
-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
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
+Requires: php-json%{?_isa}
+Requires: php-pecl(igbinary)%{?_isa}
%ifnarch ppc64
-Requires: %{?sub_prefix}php-pecl-msgpack%{?_isa}
+Requires: php-pecl-msgpack%{?_isa}
%endif
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-Obsoletes: %{?scl_prefix}php-%{pecl_name} < 3
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-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
-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}
+
+Obsoletes: php-%{pecl_name} < 3
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+Obsoletes: php-pecl-%{pecl_name} < 5
+Provides: php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+Obsoletes: php-pecl-%{pecl_name}4 < 5
+Provides: php-pecl-%{pecl_name}4 = %{version}-%{release}
+Provides: php-pecl-%{pecl_name}4%{?_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
-%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} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-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} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared object
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
+Conflicts: php-pecl-%{pecl_name} < 5
+Conflicts: php-pecl-%{pecl_name}4 < 5
%endif
@@ -114,8 +83,6 @@ This Redis client implements most of the latest Redis API.
As method only only works when also implemented on the server side,
some doesn't work with an old redis server version.
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
-
%prep
%setup -q -c
@@ -124,12 +91,11 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests, license, and bundled library
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \
+ -e '/COPYING/s/role="doc"/role="src"/' \
-e '/liblzf/d' \
-i package.xml
cd NTS
-
# Use system library
rm -r liblzf
@@ -162,8 +128,6 @@ extension = %{pecl_name}.so
;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"
; Configuration
-;redis.arrays.algorithm = ''
-;redis.arrays.auth = ''
;redis.arrays.autorehash = 0
;redis.arrays.connecttimeout = 0
;redis.arrays.distributor = ''
@@ -176,15 +140,10 @@ extension = %{pecl_name}.so
;redis.arrays.previous = ''
;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 = 1
-;redis.pconnect.connection_limit = 0
;redis.session.locking_enabled = 0
;redis.session.lock_expire = 0
;redis.session.lock_retries = 10
@@ -200,9 +159,7 @@ cd NTS
%configure \
--enable-redis \
--enable-redis-session \
-%if %{with_igbin}
--enable-redis-igbinary \
-%endif
%ifnarch ppc64
--enable-redis-msgpack \
%endif
@@ -217,9 +174,7 @@ cd ../ZTS
%configure \
--enable-redis \
--enable-redis-session \
-%if %{with_igbin}
--enable-redis-igbinary \
-%endif
%ifnarch ppc64
--enable-redis-msgpack \
%endif
@@ -256,9 +211,7 @@ done
%check
# simple module load test
DEPS="--no-php-ini --define extension=json.so"
-%if %{with_igbin}
- DEPS="$DEPS --define extension=igbinary.so"
-%endif
+DEPS="$DEPS --define extension=igbinary.so"
%ifnarch ppc64
DEPS="$DEPS --define extension=msgpack.so"
%endif
@@ -280,7 +233,7 @@ cd NTS/tests
mkdir -p data
pidfile=$PWD/redis.pid
port=$(%{__php} -r 'echo 9000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE;')
-%{_root_bindir}/redis-server \
+%{_bindir}/redis-server \
--bind 127.0.0.1 \
--port $port \
--daemonize yes \
@@ -289,9 +242,6 @@ port=$(%{__php} -r 'echo 9000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + P
--pidfile $pidfile
-# https://github.com/phpredis/phpredis/issues/1472
-#sed -e 's/testXClaim/skipXClaim/;s/testXAck/skipXAck/;s/testXReadGroup/skipXReadGroup/' -i RedisTest.php
-
: Run the test Suite
sed -e "s/6379/$port/" -i *.php
@@ -303,7 +253,7 @@ $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS TestRedis.php || ret=1
: Cleanup
if [ -f $pidfile ]; then
- %{_root_bindir}/redis-cli -p $port shutdown
+ %{_bindir}/redis-cli -p $port shutdown
fi
cat $PWD/redis.log
@@ -313,28 +263,8 @@ exit $ret
%endif
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%files
-%{?_licensedir:%license NTS/COPYING}
+%license NTS/COPYING
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml