summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-12 07:52:31 +0200
committerRemi Collet <remi@php.net>2023-07-12 07:52:31 +0200
commit8fb395c6df095a309abf3a06449782ae03e5961a (patch)
tree53878cf9f1e11d32ebdee92640b813e783b1c615
parentca9cc1dd109ed589e3eaa6c03af135da1fad0fbb (diff)
build out of sources tree
-rw-r--r--php-pecl-redis5.spec40
1 files changed, 19 insertions, 21 deletions
diff --git a/php-pecl-redis5.spec b/php-pecl-redis5.spec
index 0bd2289..e04413e 100644
--- a/php-pecl-redis5.spec
+++ b/php-pecl-redis5.spec
@@ -26,11 +26,13 @@
%global upstream_version 5.3.7
#global upstream_prever RC2
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: Extension for communicating with the Redis key-value store
Name: %{?scl_prefix}php-pecl-redis5
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/redis
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
@@ -103,12 +105,6 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
%endif
@@ -125,8 +121,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# rename source folder
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests, license, and bundled library
sed -e 's/role="test"/role="src"/' \
@@ -134,8 +128,8 @@ sed -e 's/role="test"/role="src"/' \
-e '/liblzf/d' \
-i package.xml
-cd NTS
-%patch0 -p1 -b.pr2335
+cd %{sources}
+%patch -P0 -p1 -b.pr2335
# Use system library
rm -r liblzf
@@ -148,9 +142,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Drop in the bit of configuration
@@ -225,15 +219,16 @@ peclconf() {
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -255,7 +250,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -285,7 +280,7 @@ DEPS="$DEPS --define extension=msgpack.so"
%endif
%if %{with tests}
-cd NTS/tests
+cd %{sources}/tests
: Launch redis server
mkdir -p data
@@ -343,7 +338,7 @@ fi
%files
-%{?_licensedir:%license NTS/COPYING}
+%{?_licensedir:%license %{sources}/COPYING}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -357,6 +352,9 @@ fi
%changelog
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 5.3.7-4
+- build out of sources tree
+
* Thu Mar 23 2023 Remi Collet <remi@remirepo.net> - 5.3.7-3
- add patch for test suite with redis 7.2 from
https://github.com/phpredis/phpredis/pull/2335