add patch to fix version in cmake file from

https://github.com/alanxz/rabbitmq-c/pull/667
This commit is contained in:
Remi Collet 2021-04-01 14:54:20 +02:00
parent f94a78763b
commit 46f4f862d3
2 changed files with 33 additions and 1 deletions

View File

@ -19,7 +19,7 @@
Name: %{libname}
Summary: Client library for AMQP
Version: 0.11.0
Release: 1%{?dist}
Release: 2%{?dist}
License: MIT
URL: https://github.com/alanxz/rabbitmq-c
@ -27,6 +27,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{g
# don't install static library
Patch0: %{gh_project}-static.patch
# fix version for cmake module
Patch1: %{gh_project}-version.patch
BuildRequires: gcc
BuildRequires: cmake > 2.8
@ -70,6 +72,7 @@ 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
@ -143,6 +146,10 @@ make test
%changelog
* Thu Apr 1 2021 Remi Collet <remi@remirepo.net> - 0.11.0-2
- add patch to fix version in cmake file from
https://github.com/alanxz/rabbitmq-c/pull/667
* Thu Apr 1 2021 Remi Collet <remi@remirepo.net> - 0.11.0-1
- update to 0.11.0
- add patch to not install the static library, from

25
rabbitmq-c-version.patch Normal file
View File

@ -0,0 +1,25 @@
From 2a9ae303f7fa7bc115ecb827c1c3c7c9f84558dd Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 1 Apr 2021 14:48:25 +0200
Subject: [PATCH] Fix #666 bad PACKAGE_VERSION
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9a29fd..74364cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -322,7 +322,7 @@ set(version_config "${CMAKE_CURRENT_BINARY_DIR}/rabbitmq-c-config-version.cmake"
write_basic_package_version_file(
"${version_config}"
- VERSION ${RMQ_VERSION}
+ VERSION ${VERSION}
COMPATIBILITY AnyNewerVersion)
configure_package_config_file(
--
2.30.2