diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-25 08:15:24 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-25 08:15:24 +0200 |
commit | 3b94465143a0dd2f2e769b8883534fe3460698d3 (patch) | |
tree | 14a82aa9339ad07063df0c5a53d50ce32a0039b0 /php-pecl-rdkafka6.spec | |
parent | 8bb1e8650f5a9ea5e40a1789cfc93d2663fa855e (diff) |
update to 6.0.4
open https://github.com/arnaud-lb/php-rdkafka/issues/562
build broken with PHP 7.2 and older
Diffstat (limited to 'php-pecl-rdkafka6.spec')
-rw-r--r-- | php-pecl-rdkafka6.spec | 61 |
1 files changed, 26 insertions, 35 deletions
diff --git a/php-pecl-rdkafka6.spec b/php-pecl-rdkafka6.spec index 18c157f..834acf0 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-2023 Remi Collet +# Copyright (c) 2015-2024 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 +# use library installed in /opt, change to use system library +%bcond_without move_to_opt + +# run test suite, change to skip it +%bcond_without tests %if 0%{?scl:1} %scl_package php-pecl-rdkafka6 @@ -16,7 +19,6 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name rdkafka -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} %global ini_name 40-%{pecl_name}.ini %if %{with move_to_opt} @@ -29,7 +31,7 @@ %global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) %endif -%global upstream_version 6.0.3 +%global upstream_version 6.0.4 #global upstream_prever RC2 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure @@ -37,7 +39,7 @@ Summary: Kafka client based on librdkafka Name: %{?scl_prefix}php-pecl-%{pecl_name}6 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?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 @@ -50,7 +52,8 @@ Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver} %else BuildRequires: librdkafka-devel >= 1.4 %endif -BuildRequires: %{?scl_prefix}php-devel >= 7.0 +# See https://github.com/arnaud-lb/php-rdkafka/issues/562 +BuildRequires: %{?scl_prefix}php-devel >= 7.3 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -77,9 +80,8 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}4 = %{version}-%{relea Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release} %if %{with move_to_opt} -%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$} +%global __requires_exclude_from ^%{_libdir}/.*$ %endif -%{?filter_setup} %description @@ -93,7 +95,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} @@ -128,6 +130,8 @@ export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS %configure \ @@ -139,7 +143,7 @@ cd ../NTS --with-rdkafka %endif -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS @@ -152,14 +156,14 @@ cd ../ZTS --with-rdkafka %endif -make %{?_smp_mflags} +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -168,7 +172,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -179,26 +183,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check : Minimal load test for NTS extension %{__php} --no-php-ini \ @@ -212,15 +196,17 @@ fi --modules | grep '^%{pecl_name}$' %endif +%if %{with tests} : Upstream test suite for NTS extension cd %{sources} TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -P -q --show-diff +%endif %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -234,6 +220,11 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Oct 25 2024 Remi Collet <remi@remirepo.net> - 6.0.4-1 +- update to 6.0.4 +- open https://github.com/arnaud-lb/php-rdkafka/issues/562 + build broken with PHP 7.2 and older + * Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 6.0.3-4 - rebuild for PHP 8.3.0RC1 |