diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-04 18:00:06 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-04 18:00:06 +0200 |
commit | 622e54e0b2b664b27534b4c94ad4edea5d28572c (patch) | |
tree | bbf8fc508812b7498d6d78c6f267aab887317b97 /php-pecl-memcached.spec | |
parent | 1d38a06a4793fed16af1757765843faa2132cd93 (diff) |
update to 3.3.0RC1
enable zstd compression support
Diffstat (limited to 'php-pecl-memcached.spec')
-rw-r--r-- | php-pecl-memcached.spec | 97 |
1 files changed, 23 insertions, 74 deletions
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec index 6d01272..d31bf78 100644 --- a/php-pecl-memcached.spec +++ b/php-pecl-memcached.spec @@ -18,6 +18,7 @@ %endif %bcond_without fastlz +%bcond_without zstd %bcond_without igbinary %bcond_without msgpack %bcond_without tests @@ -27,11 +28,11 @@ # After 40-igbinary, 40-json, 40-msgpack %global ini_name 50-%{pecl_name}.ini -%global upstream_version 3.2.0 -#global upstream_prever RC2 +%global upstream_version 3.3.0 +%global upstream_prever RC1 # upstream use dev => alpha => beta => RC # make RPM happy DEV => alpha => beta => rc -#global upstream_lower rc2 +%global upstream_lower %(echo %{upstream_prever} | tr '[:upper:]' '[:lower:]') %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure @@ -39,16 +40,12 @@ Summary: Extension to work with the Memcached caching daemon Name: %{?scl_prefix}php-pecl-memcached Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 9%{?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;')}} License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{sources}.tgz -# upstream patch for PHP 8.2 -Patch0: %{pecl_name}-upstream.patch -Patch1: %{pecl_name}-build.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear @@ -64,6 +61,9 @@ BuildRequires: cyrus-sasl-devel %if %{with fastlz} BuildRequires: fastlz-devel %endif +%if %{with zstd} +BuildRequires: libzstd-devel +%endif %if %{with tests} BuildRequires: memcached %endif @@ -97,35 +97,6 @@ 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 "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%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} -%endif -%endif - %if %{move_to_opt} %{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$} %endif @@ -150,13 +121,10 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} -%patch -P0 -p1 -b .up -%patch -P1 -p1 -b .pr555 - %if %{with fastlz} rm -r fastlz sed -e '/name=.fastlz/d' -i ../package.xml @@ -225,19 +193,24 @@ peclconf() { %if %{with fastlz} --with-system-fastlz \ %endif +%if %{with zstd} + --with-zstd \ +%endif --with-php-config=$1 } cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS peclconf %{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS peclconf %{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif @@ -245,7 +218,7 @@ make %{?_smp_mflags} %{?dtsenable} # Install the NTS extension -make install -C NTS INSTALL_ROOT=%{buildroot} +%make_install -C NTS # Drop in the bit of configuration # rename to z-memcached to be load after msgpack @@ -256,7 +229,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Install the ZTS extension %if %{with_zts} -make install -C ZTS INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -267,26 +240,6 @@ do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%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 - - %check OPT="-n" [ -f %{php_extdir}/igbinary.so ] && OPT="$OPT -d extension=igbinary.so" @@ -329,14 +282,6 @@ TEST_PHP_ARGS="$OPT -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -q -x --show-diff || ret=1 -%if %{with_zts} -: Run the upstream test Suite for ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="$OPT -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php -q -x --show-diff || ret=1 -%endif - # Cleanup if [ -f memcached.pid ]; then kill $(cat memcached.pid) @@ -348,7 +293,7 @@ exit $ret %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -362,6 +307,10 @@ exit $ret %changelog +* Fri Oct 4 2024 Remi Collet <remi@remirepo.net> - 3.3.0~RC1-1 +- update to 3.3.0RC1 +- enable zstd compression support + * Tue Jan 30 2024 Remi Collet <remi@remirepo.net> - 3.2.0-9 - fix incompatible pointer types using patch from https://github.com/php-memcached-dev/php-memcached/pull/555 |