summaryrefslogtreecommitdiffstats
path: root/php-pecl-memcache.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-22 15:12:51 +0200
committerRemi Collet <remi@php.net>2026-04-22 15:12:51 +0200
commit41fb809c25ecfd75ac934f33309000d7c26e2166 (patch)
tree62adaee2351c39edf03be578ff1496c320b07ebf /php-pecl-memcache.spec
parent25f32ebf1ed235517b1283686359945e98402d2d (diff)
add pie virtual provides (not yet published)HEADmaster
drop pear/pecl dependency sources from github
Diffstat (limited to 'php-pecl-memcache.spec')
-rw-r--r--php-pecl-memcache.spec73
1 files changed, 37 insertions, 36 deletions
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index 7927757..225cab2 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-memcache
#
-# SPDX-FileCopyrightText: Copyright 2007-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2007-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -12,18 +12,27 @@
%bcond_with tests
%global pecl_name memcache
+%global pie_vend websupport-sk
+%global pie_proj pecl-%{pecl_name}
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
+%global _configure ../configure
+
+# Github forge
+%global gh_vend %{pie_vend}
+%global gh_proj %{pie_proj}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
+
-Summary: Extension to work with the Memcached caching daemon
Name: %{?scl_prefix}php-pecl-memcache
-Version: 8.2
-Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Summary: Extension to work with the Memcached caching daemon
License: PHP-3.01
-URL: https://pecl.php.net/package/%{pecl_name}
+Version: 8.2
+Release: 7%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
Patch0: 118.patch
Patch1: 120.patch
@@ -31,7 +40,6 @@ Patch1: 120.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: zlib-devel
%if %{with tests}
BuildRequires: memcached
@@ -40,10 +48,15 @@ BuildRequires: memcached
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-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}
+# Extension
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -60,14 +73,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -c -q
-
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
+%forgesetup
-pushd %{sources}
%patch -P0 -p1 -b .pr118
%patch -P1 -p1 -b .pr120
@@ -78,7 +85,6 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Update the pdover macro and rebuild.
exit 1
fi
-popd
cat >%{ini_name} << 'EOF'
; ----- Enable %{pecl_name} extension module
@@ -142,11 +148,10 @@ mkdir ZTS
%build
%{?dtsenable}
-cd %{sources}
%{__phpize}
sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
-cd ../NTS
+cd NTS
%configure --with-php-config=%{__phpconfig}
%make_build
@@ -169,14 +174,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Install XML package description
-install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-# Documentation
-for i in $(grep '<file .* role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
: Minimal load test for NTS extension
@@ -192,7 +189,6 @@ done
%endif
%if %{with tests}
-cd %{sources}
: ignore test with erratic results
rm tests/040.phpt
rm tests/056.phpt
@@ -210,7 +206,7 @@ memcached -s $PWD/memcached.sock -d -P $PWD/memcached3.pid
: Upstream test suite for NTS extension
ret=0
TEST_PHP_EXECUTABLE=%{_bindir}/php \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/NTS/modules -d extension=%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{_bindir}/php -n run-tests.php --show-diff || ret=1
@@ -225,9 +221,9 @@ exit $ret
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc CREDITS
+%doc README
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -239,6 +235,11 @@ exit $ret
%changelog
+* Wed Apr 22 2026 Remi Collet <remi@remirepo.net> - 8.2-7
+- add pie virtual provides (not yet published)
+- drop pear/pecl dependency
+- sources from github
+
* Wed Oct 15 2025 Remi Collet <remi@remirepo.net> - 8.2-6
- fix for PHP 8.5.0RC1 using patch from
https://github.com/websupport-sk/pecl-memcache/pull/120