update to 0.13.0

drop patches merged upstream
This commit is contained in:
Remi Collet 2023-02-06 08:39:23 +01:00
parent 6d8fc3cdc8
commit 4a44388b3f
5 changed files with 9 additions and 84 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ clog
/rabbitmq-c-0.10.0-ffe918a.tar.gz
/rabbitmq-c-0.11.0-a64c08c.tar.gz
/rabbitmq-c-0.12.0-675afc2.tar.gz
/rabbitmq-c-0.13.0-974d71a.tar.gz

View File

@ -9,7 +9,7 @@
%bcond_without tests
%global gh_commit 675afc2c7c2f556c7fb7c1db7d3b05ce82adfb70
%global gh_commit 974d71adceae6d742ae20a4c880d99c131f1460a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner alanxz
%global gh_project rabbitmq-c
@ -18,18 +18,13 @@
Name: %{libname}
Summary: Client library for AMQP
Version: 0.12.0
Version: 0.13.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
# fix version in pkgconfig file
Patch1: %{gh_project}-pkg.patch
BuildRequires: gcc
BuildRequires: cmake > 3.12
BuildRequires: openssl-devel >= 1.1.1
@ -71,8 +66,6 @@ amqp-publish Publish a message on an AMQP server
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1
%patch1 -p1
# Copy sources to be included in -devel docs.
cp -pr examples Examples
@ -136,7 +129,7 @@ make test
%files devel
%doc AUTHORS THANKS TODO *.md
%doc AUTHORS THANKS *.md
%doc Examples
%{_libdir}/%{libname}.so
%{_includedir}/amqp*
@ -151,6 +144,10 @@ make test
%changelog
* Mon Feb 6 2023 Remi Collet <remi@remirepo.net> - 0.13.0-1
- update to 0.13.0
- drop patches merged upstream
* Wed Feb 1 2023 Remi Collet <remi@remirepo.net> - 0.12.0-1
- update to 0.12.0
- add patch to not install the static library, from

View File

@ -1,22 +0,0 @@
From f97f91c5d1db9ae97f3e1ac743ef63c1ccde4edc Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 2 Feb 2023 07:38:06 +0100
Subject: [PATCH] fix empty version for pkjgconfig
---
librabbitmq.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/librabbitmq.pc.in b/librabbitmq.pc.in
index 39401807..711d01d2 100644
--- a/librabbitmq.pc.in
+++ b/librabbitmq.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: rabbitmq-c
Description: An AMQP 0-9-1 client library
-Version: @VERSION@
+Version: @RMQ_VERSION@
URL: https://github.com/alanxz/rabbitmq-c
Requires.private: @requires_private@
Libs: -L${libdir} -lrabbitmq

View File

@ -1,51 +0,0 @@
From e1a9b7148e7ae7c55b59249e506d644af38492ed Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 1 Feb 2023 16:39:57 +0100
Subject: [PATCH] add option to install or not the static library
---
CMakeLists.txt | 3 ++-
librabbitmq/CMakeLists.txt | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc61e88f..7b7590f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,6 +129,7 @@ include(CMakeDependentOption)
option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
+option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON)
option(BUILD_EXAMPLES "Build Examples" OFF)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" OFF)
@@ -244,7 +245,7 @@ configure_package_config_file(
if(BUILD_SHARED_LIBS)
list(APPEND INSTALL_TARGETS rabbitmq)
endif()
-if(BUILD_STATIC_LIBS)
+if(BUILD_STATIC_LIBS AND INSTALL_STATIC_LIBS)
list(APPEND INSTALL_TARGETS rabbitmq-static)
endif()
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index 1cc58d58..347c992f 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -142,10 +142,12 @@ if(BUILD_STATIC_LIBS)
set_target_properties(rabbitmq-static PROPERTIES COMPILE_OPTIONS "/Z7")
endif()
- install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ if(INSTALL_STATIC_LIBS)
+ install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT rabbitmq-c-development
- )
+ )
+ endif()
add_library(rabbitmq::rabbitmq-static ALIAS rabbitmq-static)
endif()

View File

@ -1 +1 @@
SHA512 (rabbitmq-c-0.12.0-675afc2.tar.gz) = 522a7d52a156fe7510d37087582177cc50648559ab0d7626abf8d3ca1f94913a28438dc8334d50c2652d6d571baf23562b9ff73ddbaa221913ad2fd4b6b7ca25
SHA512 (rabbitmq-c-0.13.0-974d71a.tar.gz) = 58b3ca777a971ac451edb75afb2446d4bf7611134387db6dadcc95ff1f44257eb1812ff665f658544e03e14622ccc6aacc26d03d1b30a16470ccb1977275bf34