diff options
-rw-r--r-- | php-pecl-redis4.spec | 128 |
1 files changed, 31 insertions, 97 deletions
diff --git a/php-pecl-redis4.spec b/php-pecl-redis4.spec index 76bc980..23762bc 100644 --- a/php-pecl-redis4.spec +++ b/php-pecl-redis4.spec @@ -1,3 +1,6 @@ +# Fedora spec file for php-pecl-redis4 +# without SCL compatibility from: +# # remirepo spec file for php-pecl-redis4 # # Copyright (c) 2012-2018 Remi Collet @@ -6,93 +9,53 @@ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-redis -%else -%global _root_bindir %{_bindir} -%endif + +# we don't want -z defs linker flag +%undefine _strict_symbol_defs_build %global pecl_name redis %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 %global ini_name 50-%{pecl_name}.ini -%endif %global upstream_version 4.0.0 %global upstream_prever RC1 Summary: Extension for communicating with the Redis key-value store -Name: %{?sub_prefix}php-pecl-redis4 +Name: php-pecl-redis4 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist} Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz License: PHP Group: Development/Languages URL: http://pecl.php.net/package/redis -BuildRequires: %{?scl_prefix}php-devel -BuildRequires: %{?scl_prefix}php-pear -%if %{with_igbin} -BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel -%endif +BuildRequires: php-devel +BuildRequires: php-pear +BuildRequires: php-pecl-igbinary-devel BuildRequires: liblzf-devel # to run Test suite %if %{with_tests} BuildRequires: redis >= 3 %endif -Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} -Requires: %{?scl_prefix}php(api) = %{php_core_api} -%if %{with_igbin} -Requires: %{?sub_prefix}php-pecl(igbinary)%{?_isa} -%endif -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_core_api} +Requires: php-pecl(igbinary)%{?_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} +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} >= 29 -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 4 +Obsoletes: php-pecl-%{pecl_name} < 4 +Provides: php-pecl-%{pecl_name} = %{version}-%{release} +Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %else # A single version can be installed -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 4 -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php56w-pecl-%{pecl_name}4 <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php70w-pecl-%{pecl_name}4 <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php71w-pecl-%{pecl_name}4 <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name}4 <= %{version} -Obsoletes: php72w-pecl-%{pecl_name}4 <= %{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} < 4 %endif @@ -104,17 +67,15 @@ 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 # rename source folder mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS -# Don't install/register tests +# 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 @@ -178,9 +139,7 @@ cd NTS %configure \ --enable-redis \ --enable-redis-session \ -%if %{with_igbin} --enable-redis-igbinary \ -%endif --enable-redis-lzf \ --with-liblzf \ --with-php-config=%{_bindir}/php-config @@ -192,9 +151,7 @@ cd ../ZTS %configure \ --enable-redis \ --enable-redis-session \ -%if %{with_igbin} --enable-redis-igbinary \ -%endif --enable-redis-lzf \ --with-liblzf \ --with-php-config=%{_bindir}/zts-php-config @@ -228,17 +185,13 @@ 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 @@ -250,7 +203,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 \ @@ -263,15 +216,13 @@ 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 $pidfile ]; then - %{_root_bindir}/redis-cli -p $port shutdown + %{_bindir}/redis-cli -p $port shutdown fi exit $ret @@ -280,28 +231,8 @@ exit $ret %endif -%if 0%{?fedora} < 24 -# 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 @@ -315,6 +246,9 @@ fi %changelog +* Wed Feb 7 2018 Remi Collet <remi@remirepo.net> - 4.0.0~RC1-2 +- cleanup for Fedora review + * Wed Feb 7 2018 Remi Collet <remi@remirepo.net> - 4.0.0~RC1-1 - update to 4.0.0RC1 - rename to php-pecl-redis4 |