From 718aa7b84d3a4625d366d6a8ba9ba8516ca4d74c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Jan 2023 15:53:23 +0100 Subject: update to 2.0.1 rename to remi-librdkafka installed in /opt/remi/librdkafka --- librdkafka.spec | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'librdkafka.spec') diff --git a/librdkafka.spec b/librdkafka.spec index cf16f0c..ada3df6 100644 --- a/librdkafka.spec +++ b/librdkafka.spec @@ -1,36 +1,43 @@ # remirepo/fedora spec file for librdkafka # -# Copyright (c) 2015-2022 Remi Collet +# Copyright (c) 2015-2023 Remi Collet # License: CC-BY-SA # 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 9b72ca3aa6c49f8f57eea02f70aadb1453d3ba1f +%global gh_commit 96a70a7f184b18ac4d91bd3c96b4f41b832e8d06 %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 -%global upstream_version 1.9.2 +%if %{with move_to_opt} +%global _prefix /opt/%{?vendeur:%{vendeur}/}%{libname} +%global __arch_install_post /bin/true +%endif + +%global upstream_version 2.0.1 #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 +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 BuildRequires: pkgconfig(libsasl2) @@ -65,17 +72,21 @@ 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 @@ -117,13 +128,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 @@ -132,6 +151,10 @@ rm -r %{buildroot}%{_datadir}/doc/%{libname} %changelog +* Thu Jan 19 2023 Remi Collet - 2.0.1-1 +- update to 2.0.1 +- rename to remi-librdkafka installed in /opt/remi/librdkafka + * Tue Aug 2 2022 Remi Collet - 1.9.2-1 - update to 1.9.2 -- cgit