summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION7
-rw-r--r--php-pecl-simple-kafka-client.spec35
3 files changed, 25 insertions, 19 deletions
diff --git a/PHPINFO b/PHPINFO
index 4529be7..5658ef8 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -4,5 +4,5 @@ simple_kafka_client
kafka support => enabled
version => 0.1.4
build date => Jan 19 2023 00:00:00
-librdkafka version (runtime) => 2.0.0
+librdkafka version (runtime) => 2.1.0
librdkafka version (build) => 2.0.0.255
diff --git a/REFLECTION b/REFLECTION
index 159c17d..97a8d7c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,6 +1,6 @@
-Extension [ <persistent> extension #120 simple_kafka_client version 0.1.4 ] {
+Extension [ <persistent> extension #122 simple_kafka_client version 0.1.4 ] {
- - Constants [177] {
+ - Constants [178] {
Constant [ int RD_KAFKA_OFFSET_BEGINNING ] { -2 }
Constant [ int RD_KAFKA_OFFSET_END ] { -1 }
Constant [ int RD_KAFKA_OFFSET_STORED ] { -1000 }
@@ -9,7 +9,7 @@ Extension [ <persistent> extension #120 simple_kafka_client version 0.1.4 ] {
Constant [ int RD_KAFKA_PURGE_F_QUEUE ] { 1 }
Constant [ int RD_KAFKA_PURGE_F_INFLIGHT ] { 2 }
Constant [ int RD_KAFKA_PURGE_F_NON_BLOCKING ] { 4 }
- Constant [ int RD_KAFKA_VERSION ] { 33554687 }
+ Constant [ int RD_KAFKA_VERSION ] { 33620223 }
Constant [ int RD_KAFKA_BUILD_VERSION ] { 33554687 }
Constant [ int RD_KAFKA_RESP_ERR__BEGIN ] { -200 }
Constant [ int RD_KAFKA_RESP_ERR__BAD_MSG ] { -199 }
@@ -72,6 +72,7 @@ Extension [ <persistent> extension #120 simple_kafka_client version 0.1.4 ] {
Constant [ int RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST ] { -142 }
Constant [ int RD_KAFKA_RESP_ERR__NOOP ] { -141 }
Constant [ int RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET ] { -140 }
+ Constant [ int RD_KAFKA_RESP_ERR__LOG_TRUNCATION ] { -139 }
Constant [ int RD_KAFKA_RESP_ERR__END ] { -100 }
Constant [ int RD_KAFKA_RESP_ERR_UNKNOWN ] { -1 }
Constant [ int RD_KAFKA_RESP_ERR_NO_ERROR ] { 0 }
diff --git a/php-pecl-simple-kafka-client.spec b/php-pecl-simple-kafka-client.spec
index e525efd..b5d2174 100644
--- a/php-pecl-simple-kafka-client.spec
+++ b/php-pecl-simple-kafka-client.spec
@@ -28,12 +28,14 @@
%global pecl_name simple_kafka_client
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Kafka client based on librdkafka
Name: %{?scl_prefix}php-pecl-simple-kafka-client
Version: 0.1.4
-Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: BSD-3-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
@@ -42,7 +44,7 @@ BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
%if %{with move_to_opt}
-BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2
+BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2.2
Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver}
%else
BuildRequires: librdkafka-devel >= 1.4
@@ -52,7 +54,6 @@ 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}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -73,14 +74,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
# Don't install tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_SIMPLE_KAFKA_CLIENT_VERSION/{s/.* "//;s/".*$//;p}' php_simple_kafka_client_int.h)
if test "x${extver}" != "x%{version}"; then
@@ -89,9 +89,10 @@ if test "x${extver}" != "x%{version}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -109,10 +110,12 @@ EOF
export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig
%endif
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config \
+ --with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \
%if %{with move_to_opt}
--with-simple-kafka-client=/opt/%{?vendeur:%{vendeur}/}librdkafka
@@ -123,9 +126,8 @@ make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__ztsphpconfig} \
--with-libdir=%{_lib} \
%if %{with move_to_opt}
--with-simple-kafka-client=/opt/%{?vendeur:%{vendeur}/}librdkafka
@@ -155,7 +157,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -180,7 +182,8 @@ fi
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -193,7 +196,6 @@ REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -202,7 +204,7 @@ cd ../ZTS
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -216,6 +218,9 @@ cd ../ZTS
%changelog
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 0.1.4-5
+- buid out of sources tree
+
* Thu Jan 19 2023 Remi Collet <remi@remirepo.net> - 0.1.4-4
- rebuild using remi-librdkafka 2.0.1