From 8ee0d922b6853ad562436c49ca21967e340d5a7b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 20 Jan 2023 11:13:10 +0100 Subject: rebuild using remi-librdkafka 2.0.1 --- php-pecl-rdkafka6.spec | 64 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 14 deletions(-) (limited to 'php-pecl-rdkafka6.spec') diff --git a/php-pecl-rdkafka6.spec b/php-pecl-rdkafka6.spec index 11d5d87..12a3716 100644 --- a/php-pecl-rdkafka6.spec +++ b/php-pecl-rdkafka6.spec @@ -1,14 +1,17 @@ # remirepo/fedora spec file for php-pecl-rdkafka6 # -# Copyright (c) 2015-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2015-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # + +# use library installed in /opt +%bcond_without move_to_opt + %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-rdkafka +%scl_package php-pecl-rdkafka6 %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -16,38 +19,46 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %global ini_name 40-%{pecl_name}.ini +%if %{with move_to_opt} +# Disable RPATH check +%global __arch_install_post /bin/true +%global __brp_check_rpaths /bin/true + +%global buildver %(PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) +%else %global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) +%endif %global upstream_version 6.0.3 #global upstream_prever RC2 Summary: Kafka client based on librdkafka -Name: %{?sub_prefix}php-pecl-%{pecl_name}6 +Name: %{?scl_prefix}php-pecl-%{pecl_name}6 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -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;')}} License: MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: librdkafka1php-devel >= 1.9 +%if %{with move_to_opt} +BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2 +Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver} +%else +BuildRequires: librdkafka-devel >= 1.4 +%endif BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} -Requires: librdkafka1php%{?_isa} >= %{buildver} 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} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif %if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 || "%{php_version}" >= "8.1" Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5 @@ -64,6 +75,11 @@ 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} +%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$} + %endif +%{?filter_setup} + %description This extension is a librdkafka binding providing a working client for Kafka. @@ -104,11 +120,22 @@ EOF %build %{?dtsenable} +%if %{with move_to_opt} +# not yet used +export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig +%endif + cd NTS %{_bindir}/phpize %configure \ --with-php-config=%{_bindir}/php-config \ - --with-rdkafka + --with-libdir=%{_lib} \ +%if %{with move_to_opt} + --with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka +%else + --with-rdkafka +%endif + make %{?_smp_mflags} %if %{with_zts} @@ -116,7 +143,13 @@ cd ../ZTS %{_bindir}/zts-phpize %configure \ --with-php-config=%{_bindir}/zts-php-config \ - --with-rdkafka + --with-libdir=%{_lib} \ +%if %{with move_to_opt} + --with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka +%else + --with-rdkafka +%endif + make %{?_smp_mflags} %endif @@ -201,6 +234,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Jan 19 2023 Remi Collet - 6.0.3-2 +- rebuild using remi-librdkafka 2.0.1 + * Mon Jul 4 2022 Remi Collet - 6.0.3-1 - update to 6.0.3 (no change) - rebuild with librdkafka 1.9.0 -- cgit