From b13daea536975ec78a750955ef0e2d6205bafec0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Apr 2021 11:54:32 +0200 Subject: update to 0.11.0 add patch to not install the static library, from https://github.com/alanxz/rabbitmq-c/pull/665 --- librabbitmq.spec | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) (limited to 'librabbitmq.spec') diff --git a/librabbitmq.spec b/librabbitmq.spec index c4c1226..ba34365 100644 --- a/librabbitmq.spec +++ b/librabbitmq.spec @@ -3,19 +3,21 @@ # # Fedora spec file for librabbitmq # -# Copyright (c) 2012-2020 Remi Collet +# Copyright (c) 2012-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit ffe918a5fcef72038a88054dca3c56762b1953d4 +%bcond_without tests + +%global gh_commit a64c08c68aff34d49a2ac152f04988cd921084f9 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner alanxz %global gh_project rabbitmq-c %global libname librabbitmq -# soname 4 since 0.6.0 (Fedora 23 / EL-7) 0.7.0/4.1, 0.8.0/4.2, 0.9.0/4.3, 0.10.0/4.4 +# soname 4 since 0.6.0 (Fedora 23 / EL-7) 0.7.0/4.1, 0.8.0/4.2, 0.9.0/4.3 (EL-8), 0.10.0/4.4, 0.11.0/4.5 # soname 1 up to 0.5.2 %global soname 4 @@ -25,13 +27,16 @@ Name: %{libname}-last Name: %{libname} %endif Summary: Client library for AMQP -Version: 0.10.0 -Release: 3%{?dist} +Version: 0.11.0 +Release: 1%{?dist} License: MIT URL: https://github.com/alanxz/rabbitmq-c Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +# don't install static library +Patch0: %{gh_project}-static.patch + BuildRequires: gcc BuildRequires: cmake > 2.8 # https://github.com/alanxz/rabbitmq-c/issues/503 @@ -48,7 +53,7 @@ Obsoletes: %{libname}-last <= %{version} %description This is a C-language AMQP client library for use with AMQP servers speaking protocol versions 0-9-1. -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" This package is designed to be installed beside system %{libname}. %endif @@ -56,7 +61,7 @@ This package is designed to be installed beside system %{libname}. %package devel Summary: Header files and development libraries for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" Conflicts: %{libname}-devel < %{version} Provides: %{libname}-devel = %{version}-%{release} %else @@ -71,7 +76,7 @@ for %{name}. %package tools Summary: Example tools built using the librabbitmq package Requires: %{name}%{?_isa} = %{version} -%if "%{name}" != %{libname} +%if "%{name}" != "%{libname}" Conflicts: %{libname}-tools < %{version} Provides: %{libname}-tools = %{version}-%{release} %else @@ -91,6 +96,7 @@ amqp-publish Publish a message on an AMQP server %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 # Copy sources to be included in -devel docs. cp -pr examples Examples @@ -103,7 +109,12 @@ sed -e '/test_basic/d' -i tests/CMakeLists.txt # static lib required for tests %cmake \ -DBUILD_TOOLS_DOCS:BOOL=ON \ - -DBUILD_STATIC_LIBS:BOOL=ON \ +%if %{with tests} + -DINSTALL_STATIC_LIBS:BOOL=OFF \ +%else + -DBUILD_TESTS:BOOL=OFF \ + -DBUILD_STATIC_LIBS:BOOL=OFF \ +%endif -S . %if 0%{?cmake_build:1} @@ -120,19 +131,23 @@ make %{_smp_mflags} make install DESTDIR="%{buildroot}" %endif -rm %{buildroot}%{_libdir}/%{libname}.a - %check : check .pc is usable grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1 +: check cmake files are usable +grep static %{buildroot}%{_libdir}/cmake/rabbitmq-c/*.cmake && exit 1 +%if %{with tests} : upstream tests %if 0%{?ctest:1} %ctest %else make test %endif +%else +: Tests disabled +%endif %if 0%{?fedora} < 28 && 0%{?rhel} < 8 @@ -153,6 +168,7 @@ make test %{_libdir}/%{libname}.so %{_includedir}/amqp* %{_libdir}/pkgconfig/%{libname}.pc +%{_libdir}/cmake/rabbitmq-c %files tools %{_bindir}/amqp-* @@ -163,6 +179,11 @@ make test ## NOTICE: 0.8.0 available in RHEL 7.5, 0.9.0 in RHEL 8.0 %changelog +* Thu Apr 1 2021 Remi Collet - 0.11.0-1 +- update to 0.11.0 +- add patch to not install the static library, from + https://github.com/alanxz/rabbitmq-c/pull/665 + * Thu Aug 13 2020 Remi Collet - 0.10.0-3 - fix cmake macros usage, FTBFS #1863670 -- cgit