summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-rdkafka5.spec18
1 files changed, 12 insertions, 6 deletions
diff --git a/php-pecl-rdkafka5.spec b/php-pecl-rdkafka5.spec
index 4c7ed08..1ff5284 100644
--- a/php-pecl-rdkafka5.spec
+++ b/php-pecl-rdkafka5.spec
@@ -18,13 +18,16 @@
%global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536)
+%global upstream_version 5.0.1
+#global upstream_prever RC1
+
Summary: Kafka client based on librdkafka
Name: %{?sub_prefix}php-pecl-%{pecl_name}5
-Version: 5.0.1
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
+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}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -84,7 +87,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
+mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install tests
sed -e 's/role="test"/role="src"/' \
@@ -94,8 +97,8 @@ sed -e 's/role="test"/role="src"/' \
cd NTS
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h)
-if test "x${extver}" != "x%{version}"; then
- : Error: Upstream extension version is ${extver}, expecting %{version}.
+if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
exit 1
fi
cd ..
@@ -214,6 +217,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
* Fri Nov 19 2021 Remi Collet <remi@remirepo.net> - 5.0.1-1
- update to 5.0.1
+
+* Fri Nov 19 2021 Remi Collet <remi@remirepo.net> - 5.0.1-1
+- update to 5.0.1
- drop patch merged upstream
* Fri Sep 10 2021 Remi Collet <remi@remirepo.net> - 5.0.0-4