diff options
Diffstat (limited to 'php-pecl-redis.spec')
-rw-r--r-- | php-pecl-redis.spec | 125 |
1 files changed, 88 insertions, 37 deletions
diff --git a/php-pecl-redis.spec b/php-pecl-redis.spec index d503bd3..e90c50e 100644 --- a/php-pecl-redis.spec +++ b/php-pecl-redis.spec @@ -10,18 +10,16 @@ # Please, preserve the changelog entries # %if 0%{?scl:1} -%if "%{scl}" == "rh-php56" -%global sub_prefix more-php56- -%else %global sub_prefix %{scl_prefix} -%endif %scl_package php-pecl-redis +%else +%global _root_bindir %{_bindir} %endif - %global pecl_name redis -%global with_zts 0%{?__ztsphp:1} -%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global with_tests 0%{?_with_tests:1} +%global with_igbin 1 %if "%{php_version}" < "5.6" # after igbinary %global ini_name %{pecl_name}.ini @@ -32,28 +30,29 @@ Summary: Extension for communicating with the Redis key-value store Name: %{?sub_prefix}php-pecl-redis -Version: 2.2.8 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 3.1.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz License: PHP Group: Development/Languages URL: http://pecl.php.net/package/redis -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz - -Patch0: %{pecl_name}-pr840.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear +%if %{with_igbin} BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel +%endif # to run Test suite %if %{with_tests} -BuildRequires: redis >= 2.6 +BuildRequires: redis >= 3 %endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -# php-pecl-igbinary missing php-pecl(igbinary)%{?_isa} -Requires: %{?sub_prefix}php-pecl-igbinary%{?_isa} +%if %{with_igbin} +Requires: %{?sub_prefix}php-pecl(igbinary)%{?_isa} +%endif %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version} @@ -80,6 +79,14 @@ Obsoletes: php55w-pecl-%{pecl_name} <= %{version} Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.1" +Obsoletes: php71u-pecl-%{pecl_name} <= %{version} +Obsoletes: php71w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -102,22 +109,20 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c +# rename source folder +mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \ -i package.xml -# rename source folder -mv %{pecl_name}-%{version} NTS - cd NTS -%patch0 -p1 -b .pr840 # Sanity check, really often broken extver=$(sed -n '/#define PHP_REDIS_VERSION/{s/.* "//;s/".*$//;p}' php_redis.h) -if test "x${extver}" != "x%{version}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}. +if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-devphp7}. exit 1 fi cd .. @@ -161,7 +166,9 @@ cd NTS %configure \ --enable-redis \ --enable-redis-session \ +%if %{with_igbin} --enable-redis-igbinary \ +%endif --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} @@ -171,7 +178,9 @@ cd ../ZTS %configure \ --enable-redis \ --enable-redis-session \ +%if %{with_igbin} --enable-redis-igbinary \ +%endif --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif @@ -203,13 +212,17 @@ done %check # simple module load test %{__php} --no-php-ini \ +%if %{with_igbin} --define extension=igbinary.so \ +%endif --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 --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} %endif @@ -218,11 +231,8 @@ done cd NTS/tests # Launch redis server -mkdir -p {run,log,lib}/redis -sed -e "s:/^pidfile.*$:/pidfile $PWD/run/redis.pid:" \ - -e "s:/var:$PWD:" \ - -e "/daemonize/s/no/yes/" \ - /etc/redis.conf >redis.conf +mkdir -p data +pidfile=$PWD/redis.pid # port number to allow 32/64 build at same time # and avoid conflict with a possible running server %if 0%{?__isa_bits} @@ -234,20 +244,28 @@ port=6414 port=6382 %endif %endif -sed -e "s/6379/$port/" -i redis.conf -sed -e "s/6379/$port/" -i *.php -%{_bindir}/redis-server ./redis.conf +%{_root_bindir}/redis-server \ + --bind 127.0.0.1 \ + --port $port \ + --daemonize yes \ + --logfile $PWD/redis.log \ + --dir $PWD/data \ + --pidfile $pidfile + +sed -e "s/6379/$port/" -i RedisTest.php # Run the test Suite ret=0 %{__php} --no-php-ini \ +%if %{with_igbin} --define extension=igbinary.so \ +%endif --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ TestRedis.php || ret=1 # Cleanup -if [ -f run/redis.pid ]; then - %{_bindir}/redis-cli -p $port shutdown +if [ -f $pidfile ]; then + %{_root_bindir}/redis-cli -p $port shutdown fi exit $ret @@ -297,14 +315,47 @@ rm -rf %{buildroot} %changelog -* Fri Jun 17 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-2 -- test build for https://github.com/phpredis/phpredis/issues/742 +* Thu Dec 15 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-1 +- update to 3.1.0 +- open https://github.com/phpredis/phpredis/issues/1052 max version +- open https://github.com/phpredis/phpredis/issues/1053 segfault +- open https://github.com/phpredis/phpredis/issues/1054 warnings +- open https://github.com/phpredis/phpredis/issues/1055 reflection +- open https://github.com/phpredis/phpredis/issues/1056 32bits tests + +* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-3 +- rebuild with PHP 7.1.0 GA + +* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-2 +- rebuild for PHP 7.1 new API version + +* Sat Jun 11 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-1 +- Update to 3.0.0 (stable) + +* Thu Jun 9 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.1.20160603git6447940 +- refresh and bump version + +* Thu May 5 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.6.20160504gitad3c116 +- refresh + +* Thu Mar 3 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.5.20160215git2887ad1 +- enable igbinary support + +* Fri Feb 19 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.4.20160215git2887ad1 +- refresh + +* Thu Feb 11 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.3.20160208git0d4b421 +- refresh + +* Tue Jan 26 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.2.20160125git7b36957 +- refresh -* Thu Jun 9 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-1 -- Update to 2.2.8 (stable) +* Sun Jan 10 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.2.20160106git4a37e47 +- improve package.xml, set stability=devel -* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 2.2.7-3 -- adapt for F24 +* Sun Jan 10 2016 Remi Collet <remi@fedoraproject.org> - 2.2.8-0.1.20160106git4a37e47 +- update to 2.2.8-dev for PHP 7 +- use git snapshot * Sat Jun 20 2015 Remi Collet <remi@fedoraproject.org> - 2.2.7-2 - allow build against rh-php56 (as more-php56) |