summaryrefslogtreecommitdiffstats
path: root/php-pecl-rdkafka7.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-rdkafka7.spec')
-rw-r--r--php-pecl-rdkafka7.spec96
1 files changed, 29 insertions, 67 deletions
diff --git a/php-pecl-rdkafka7.spec b/php-pecl-rdkafka7.spec
index fc1cf25..ee12948 100644
--- a/php-pecl-rdkafka7.spec
+++ b/php-pecl-rdkafka7.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for php-pecl-rdkafka6
+# remirepo/fedora spec file for php-pecl-rdkafka7
#
# SPDX-FileCopyrightText: Copyright 2015-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
@@ -14,11 +14,10 @@
%bcond_without tests
%if 0%{?scl:1}
-%scl_package php-pecl-rdkafka6
+%scl_package php-pecl-rdkafka7
%endif
%global pecl_name rdkafka
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pie_vend %{pecl_name}
%global pie_proj %{pecl_name}
%global ini_name 40-%{pecl_name}.ini
@@ -33,21 +32,20 @@
%global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536)
%endif
-%global upstream_version 6.0.5
-#global upstream_prever RC2
-%global _configure ../configure
+%global upstream_version 7.0.0
+%global upstream_prever alpha1
# Github forge
-%global gh_vend arnaud-lb
+%global gh_vend php-rdkafka
%global gh_proj php-rdkafka
%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
%global tag %{upstream_version}%{?upstream_prever}
-Name: %{?scl_prefix}php-pecl-%{pecl_name}6
+Name: %{?scl_prefix}php-pecl-%{pecl_name}7
Summary: Kafka client based on librdkafka
License: MIT
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}
+Release: 1%{?dist}
%forgemeta
URL: %{forgeurl}
Source0: %{forgesource}
@@ -55,12 +53,12 @@ Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
%if %{with move_to_opt}
-BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2.2
+BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2.14
Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver}
%else
-BuildRequires: librdkafka-devel >= 1.4
+BuildRequires: librdkafka-devel >= 1.5.3
%endif
-BuildRequires: %{?scl_prefix}php-devel >= 7.0
+BuildRequires: %{?scl_prefix}php-devel >= 8.1
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -75,20 +73,18 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
-%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 || "%{php_version}" >= "8.1"
-Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5
-Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6
+%if 0%{?fedora} >= 45 || 0%{?rhel} >= 11 || "%{php_version}" >= "8.6"
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 7
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}5 < 7
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}6 < 7
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%else
# A single version can be installed
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 5
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 7
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}5 < 7
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}7 < 7
%endif
-# no BC break (only PHP supported versions)
-Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}4 = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release}
%if %{with move_to_opt}
%global __requires_exclude_from ^%{_libdir}/.*$
@@ -98,6 +94,8 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{relea
%description
This extension is a librdkafka binding providing a working client for Kafka.
+This package provides version 7.
+
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -111,16 +109,10 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
exit 1
fi
-mkdir NTS
-%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-mkdir ZTS
-%endif
-
# Create configuration file
cat > %{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
-extension=%{pecl_name}.so
+extension=%{pecl_name}
EOF
@@ -133,50 +125,28 @@ export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig
%endif
%{__phpize}
-[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
-sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
-cd NTS
%configure \
--with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \
%if %{with move_to_opt}
--with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka
%else
- --with-rdkafka
-%endif
-
-%make_build
-
-%if %{with_zts}
-cd ../ZTS
-%configure \
- --with-php-config=%{__ztsphpconfig} \
- --with-libdir=%{_lib} \
-%if %{with move_to_opt}
- --with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka
-%else
- --with-rdkafka
+ --with-rdkafka
%endif
%make_build
-%endif
%install
%{?dtsenable}
-%make_install -C NTS
+%make_install
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-%if %{with_zts}
-%make_install -C ZTS
-
-install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-%endif
-
%check
: Minimal load test for NTS extension
@@ -184,17 +154,9 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-%if %{with_zts}
-: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
- --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep '^%{pecl_name}$'
-%endif
-
%if %{with tests}
: Upstream test suite for NTS extension
-TEST_PHP_ARGS="-n -d extension=$PWD/NTS/modules/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
+TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
%{__php} -n run-tests.php -P -q --show-diff
%endif
@@ -207,13 +169,13 @@ REPORT_EXIT_STATUS=1 \
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%if %{with_zts}
-%config(noreplace) %{php_ztsinidir}/%{ini_name}
-%{php_ztsextdir}/%{pecl_name}.so
-%endif
-
%changelog
+* Thu Apr 30 2026 Remi Collet <remi@remirepo.net> - 7.0.0~alpha1-1
+- update to 7.0.0alpha1
+- rename to php-pecl-rdkafka7
+- drop ZTS
+
* Thu Apr 23 2026 Remi Collet <remi@remirepo.net> - 6.0.5-2
- drop pear/pecl dependency
- sources from github