From d322ce360d270f32836c6291b67c59c79fd16d16 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 11 Jul 2023 17:28:58 +0200 Subject: build out of sources tree --- php-pecl-memcache.spec | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec index 7285761..a6c3ee0 100644 --- a/php-pecl-memcache.spec +++ b/php-pecl-memcache.spec @@ -14,11 +14,13 @@ %global pecl_name memcache %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Extension to work with the Memcached caching daemon Name: %{?scl_prefix}php-pecl-memcache Version: 8.2 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} @@ -34,7 +36,6 @@ BuildRequires: memcached Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} @@ -78,14 +79,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -pushd NTS +pushd %{sources} # Check version as upstream often forget to update this extver=$(sed -n '/#define PHP_MEMCACHE_VERSION/{s/.* "//;s/".*$//;p}' src/php_memcache.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -148,23 +148,25 @@ extension=%{pecl_name}.so ;memcache.session_save_path = '' EOF +mkdir NTS %if %{with_zts} -cp -r NTS ZTS +mkdir ZTS %endif %build %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config +%configure --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -186,7 +188,7 @@ install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Documentation for i in $(grep ' - 8.2-2 +- build out of sources tree + * Mon May 1 2023 Remi Collet - 8.2-1 - update to 8.2 - drop patches merged upstream -- cgit