summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-07 08:07:58 +0200
committerRemi Collet <remi@php.net>2026-04-07 08:07:58 +0200
commitc70a7094311003053381974d9c7ced3774113b32 (patch)
treeb1c2cf1c17e3fdc46bef0a1358dbf1262af860da
parentbf9848d5309fafb466725bb8c1591583b9026d34 (diff)
update to 2.2.0
drop pear/pecl dependency sources from github
-rw-r--r--composer.json19
-rw-r--r--php-pecl-gearman.spec62
2 files changed, 51 insertions, 30 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..f64c08d
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,19 @@
+{
+ "name": "php/pecl-networking-gearman",
+ "type": "php-ext",
+ "description": "PHP wrapper to libgearman",
+ "license": "PHP-3.01",
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "php-ext": {
+ "extension-name": "gearman",
+ "configure-options": [
+ {
+ "name": "with-gearman",
+ "description": "Path to libgearman installation",
+ "needs-value": true
+ }
+ ]
+ }
+}
diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec
index 814807d..5876cad 100644
--- a/php-pecl-gearman.spec
+++ b/php-pecl-gearman.spec
@@ -10,33 +10,38 @@
#
%{?scl:%scl_package php-pecl-gearman}
+%bcond_without tests
+
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name gearman
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global sources %{archivename}
%global _configure ../%{sources}/configure
-%bcond_without tests
-
%global libver 1.1.0
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-networking-%{pecl_name}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{pecl_name}-%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{tag}
+
Name: %{?scl_prefix}php-pecl-gearman
-Version: 2.1.4
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Summary: PHP wrapper to libgearman
-
License: PHP-3.01
-URL: https://pecl.php.net/package/gearman
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-
-Patch0: 41.patch
+Version: 2.2.0
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: libgearman-devel > %{libver}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.1
-BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-devel >= 7.2
# Required by phpize
BuildRequires: autoconf, automake, libtool
@@ -61,15 +66,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Dont register tests on install
-sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
- -i package.xml
-
-
pushd %{sources}
-%patch -P0 -p1
-
extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' php_gearman.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream version is ${extver}, expecting %{version}.
@@ -91,6 +88,9 @@ mkdir ZTS
%build
%{?dtsenable}
+# https://github.com/php/pecl-networking-gearman/issues/61
+export CFLAGS="%{optflags} -Wno-incompatible-pointer-types"
+
cd %{sources}
%{__phpize}
[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
@@ -112,9 +112,6 @@ cd ../ZTS
%make_install -C NTS
-# Install XML package description
-install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
# install config file
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -123,11 +120,6 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-for i in $(grep '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
@@ -153,8 +145,13 @@ REPORT_EXIT_STATUS=1 \
%files
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license %{sources}/LICENSE
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/ChangeLog
+%doc %{sources}/README
+%doc %{sources}/TODO
+%doc %{sources}/examples
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -166,6 +163,11 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Apr 7 2026 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+- drop pear/pecl dependency
+- sources from github
+
* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 2.1.4-2
- add fix for PHP 8.5.0alpha2 using patch from
https://github.com/php/pecl-networking-gearman/pull/41