summaryrefslogtreecommitdiffstats
path: root/librdkafka.spec
diff options
context:
space:
mode:
Diffstat (limited to 'librdkafka.spec')
-rw-r--r--librdkafka.spec145
1 files changed, 118 insertions, 27 deletions
diff --git a/librdkafka.spec b/librdkafka.spec
index 5ce1d6d..e349d39 100644
--- a/librdkafka.spec
+++ b/librdkafka.spec
@@ -1,52 +1,62 @@
# remirepo/fedora spec file for librdkafka
#
-# Copyright (c) 2015-2020 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
#
+
+## TODO obsoletes librdkafka1php
+
+# install in /opt to avoid conflict with system library (by default)
+%bcond_without move_to_opt
+
%global libname librdkafka
-%global gh_commit 3bdf2d05fad1ef699910f7f9e7152c58aa24375e
+%global gh_commit 95a542c87c61d2c45b445f91c73dd5442eb04f3c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner edenhill
%global gh_project %{libname}
-%global oldsoname 1
-%global newsoname 101
+%global soname 1
+
+%if %{with move_to_opt}
+%global _prefix /opt/%{?vendeur:%{vendeur}/}%{libname}
+%global __arch_install_post /bin/true
+%endif
-%global upstream_version 1.4.4
-#global upstream_prever RC1
+%global upstream_version 2.3.0
+#global upstream_prever RC4
-Name: %{libname}%{oldsoname}php
+Name: %{?vendeur:%{vendeur}-}%{libname}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}
Group: System Environment/Libraries
Summary: Apache Kafka C/C++ client library
-# librdkafka is BSD-2, pycrc is MIT, snappy/crc32 are BSD-3
-License: BSD and MIT
+# librdkafka is BSD-2-Clause
+# crc32, queue, snappy, tinycthread are BSD-3-Clause
+# cjson, hdrhistogram, murmur2, pycrc are MIT
+# fnv1a is Public Domain
+License: BSD-2-Clause AND BSD-3-Clause AND MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
-# Bump soname from 1 to 101 to allow parallel installation
-Patch0: %{libname}-soname.patch
-
BuildRequires: libstdc++-devel
BuildRequires: openssl-devel
-%if 0%{?rhel} == 6
-BuildRequires: cyrus-sasl-devel
-%else
BuildRequires: pkgconfig(libsasl2)
-%endif
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(libzstd)
-BuildRequires: gcc-c++
-%if 0%{?fedora} >= 28 || 0%{?rhel} >=8
-BuildRequires: python3
+BuildRequires: pkgconfig(RapidJSON)
+BuildRequires: pkgconfig(libcurl)
+
+%if 0%{?rhel} == 7
+%global dtsenable source /opt/rh/devtoolset-7/enable
+BuildRequires: devtoolset-7-toolchain
%else
-BuildRequires: python
+BuildRequires: gcc-c++
%endif
+BuildRequires: python3
%description
@@ -65,24 +75,34 @@ and only used by PHP binaries (rdkafka extension).
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
-Conflicts: %{libname}-devel < %{version}
-Provides: %{libname}-devel = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
+%if %{with move_to_opt}
+# Filter in the /opt installation
+%{?filter_from_provides: %filter_from_provides /%{libname}/d}
+%{?filter_from_requires: %filter_from_requires /%{libname}/d}
+%{?filter_setup}
+%endif
+
%prep
%setup -qn %{gh_project}-%{gh_commit}
-%patch0 -p1 -b .bump
mkdir rpmdocs
cp -pr examples rpmdocs/examples
%build
+%{?dtsenable}
+gcc --version
+
%configure \
+ --enable-curl \
+ --enable-zlib \
+ --enable-zstd \
--enable-lz4 \
--enable-lz4-ext \
--enable-ssl \
@@ -93,6 +113,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
make install DESTDIR=%{buildroot}
rm %{buildroot}%{_libdir}/*.a
@@ -109,13 +131,21 @@ rm -r %{buildroot}%{_datadir}/doc/%{libname}
%files
%{!?_licensedir:%global license %%doc}
-%license LICENSE*
-%{_libdir}/%{libname}.so.%{newsoname}
-%{_libdir}/%{libname}++.so.%{newsoname}
+%license LICENS*
+%if %{with move_to_opt}
+%dir %{_prefix}
+%dir %{_libdir}
+%endif
+%{_libdir}/%{libname}.so.%{soname}
+%{_libdir}/%{libname}++.so.%{soname}
%files devel
%doc *md
%doc rpmdocs/examples
+%if %{with move_to_opt}
+%dir %{_includedir}
+%dir %{_libdir}/pkgconfig
+%endif
%{_includedir}/%{libname}/
%{_libdir}/%{libname}.so
%{_libdir}/%{libname}++.so
@@ -124,6 +154,67 @@ rm -r %{buildroot}%{_datadir}/doc/%{libname}
%changelog
+* Wed Oct 25 2023 Remi Collet <remi@remirepo.net> - 2.3.0-1
+- update to 2.3.0
+
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+
+* Wed May 3 2023 Remi Collet <remi@remirepo.net> - 2.1.1-1
+- update to 2.1.1
+
+* Thu Apr 6 2023 Remi Collet <remi@remirepo.net> - 2.1.0-1
+- update to 2.1.0
+
+* Mon Jan 23 2023 Remi Collet <remi@remirepo.net> - 2.0.2-1
+- update to 2.0.2
+
+* Thu Jan 19 2023 Remi Collet <remi@remirepo.net> - 2.0.1-1
+- update to 2.0.1
+- rename to remi-librdkafka installed in /opt/remi/librdkafka
+
+* Tue Aug 2 2022 Remi Collet <remi@remirepo.net> - 1.9.2-1
+- update to 1.9.2
+
+* Thu Jul 7 2022 Remi Collet <remi@remirepo.net> - 1.9.1-1
+- update to 1.9.1
+
+* Thu Jun 16 2022 Remi Collet <remi@remirepo.net> - 1.9.0-1
+- update to 1.9.0
+
+* Wed Apr 27 2022 Remi Collet <remi@remirepo.net> - 1.9.0~RC4-1
+- update to 1.9.0RC4
+
+* Mon Apr 11 2022 Remi Collet <remi@remirepo.net> - 1.9.0~RC2-1
+- update to 1.9.0RC2
+- add dependency on libcurl
+
+* Tue Oct 19 2021 Remi Collet <remi@remirepo.net> - 1.8.2-1
+- update to 1.8.2
+
+* Tue Sep 21 2021 Remi Collet <remi@remirepo.net> - 1.8.0-1
+- update to 1.8.0
+
+* Mon May 10 2021 Remi Collet <remi@remirepo.net> - 1.7.0-1
+- update to 1.7.0
+
+* Thu Feb 25 2021 Remi Collet <remi@remirepo.net> - 1.6.1-1
+- update to 1.6.1
+
+* Wed Jan 27 2021 Remi Collet <remi@remirepo.net> - 1.6.0-1
+- update to 1.6.0
+
+* Wed Dec 9 2020 Remi Collet <remi@remirepo.net> - 1.5.3-1
+- update to 1.5.3
+- use rapidjson
+
+* Tue Oct 20 2020 Remi Collet <remi@remirepo.net> - 1.5.2-1
+- update to 1.5.2
+
+* Mon Jul 20 2020 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+- use GCC 6 on EL-6, GCC 7 on EL-7
+
* Sun Jun 21 2020 Remi Collet <remi@remirepo.net> - 1.4.4-1
- update to 1.4.4