Skip to content

Commit 89692b6

Browse files
authored
Upgrade: librabbitmq version to 0.14.0 (#11018)
1 parent 0abef50 commit 89692b6

3 files changed

Lines changed: 55 additions & 21 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"rabbitmq-c-0.10.0-ffe918a.tar.gz": "7cb887fcdac80ea1aa648271ae0fee8d3f8a26337b755497e603711399fad950"
3+
"rabbitmq-c-0.14.0-124722b.tar.gz": "0453a6f15b265abecbed2c7ec5fc101a6bcd25498ff923bb50b43e6910e32383"
44
}
5-
}
5+
}

SPECS-EXTENDED/librabbitmq/librabbitmq.spec

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ Vendor: Microsoft Corporation
22
Distribution: Azure Linux
33
# Fedora spec file for librabbitmq
44
#
5-
# Copyright (c) 2012-2019 Remi Collet
6-
# License: CC-BY-SA
5+
# Copyright (c) 2012-2024 Remi Collet
6+
# License: CC-BY-SA-4.0
77
# http://creativecommons.org/licenses/by-sa/4.0/
88
#
99
# Please, preserve the changelog entries
1010
#
1111

12-
%global gh_commit ffe918a5fcef72038a88054dca3c56762b1953d4
12+
%bcond_without tests
13+
14+
%global gh_commit 124722b5045baa41a24ce2e2d7c52a47467e7ac0
1315
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
1416
%global gh_owner alanxz
1517
%global gh_project rabbitmq-c
@@ -18,20 +20,22 @@ Distribution: Azure Linux
1820

1921
Name: %{libname}
2022
Summary: Client library for AMQP
21-
Version: 0.10.0
22-
Release: 4%{?dist}
23+
Version: 0.14.0
24+
Release: 1%{?dist}
2325
License: MIT
2426
URL: https://github.com/alanxz/rabbitmq-c
2527

2628
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
2729

30+
2831
BuildRequires: gcc
29-
BuildRequires: cmake > 2.8
30-
BuildRequires: openssl-devel
32+
BuildRequires: cmake >= 3.22
33+
BuildRequires: openssl-devel >= 1.1.1
3134
# For tools
32-
BuildRequires: popt-devel > 1.14
35+
BuildRequires: popt-devel >= 1.14
3336
# For man page
3437
BuildRequires: xmlto
38+
BuildRequires: make
3539

3640

3741
%description
@@ -50,7 +54,7 @@ for %{name}.
5054

5155
%package tools
5256
Summary: Example tools built using the librabbitmq package
53-
Requires: %{name}%{?_isa} = %{version}
57+
Requires: %{name}%{?_isa} = %{version}-%{release}
5458

5559
%description tools
5660
This package contains example tools built using %{name}.
@@ -76,38 +80,65 @@ sed -e '/test_basic/d' -i tests/CMakeLists.txt
7680
%build
7781
# static lib required for tests
7882
%cmake \
83+
-DBUILD_TOOLS:BOOL=ON \
7984
-DBUILD_TOOLS_DOCS:BOOL=ON \
80-
-DBUILD_STATIC_LIBS:BOOL=ON \
81-
.
82-
85+
%if %{with tests}
86+
-DINSTALL_STATIC_LIBS:BOOL=OFF \
87+
%else
88+
-DBUILD_TESTING:BOOL=OFF \
89+
-DBUILD_STATIC_LIBS:BOOL=OFF \
90+
%endif
91+
-S .
92+
93+
%if 0%{?cmake_build:1}
94+
%cmake_build
95+
%else
8396
make %{_smp_mflags}
97+
%endif
8498

8599

86100
%install
101+
%if 0%{?cmake_install:1}
102+
%cmake_install
103+
%else
87104
make install DESTDIR="%{buildroot}"
88-
89-
rm %{buildroot}%{_libdir}/%{libname}.a
105+
%endif
90106

91107

92108
%check
93109
: check .pc is usable
94110
grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1
111+
grep %{version} %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc || exit 1
112+
: check cmake files are usable
113+
grep static %{buildroot}%{_libdir}/cmake/rabbitmq-c/*.cmake && exit 1
114+
95115

116+
%if %{with tests}
96117
: upstream tests
118+
%if 0%{?ctest:1}
119+
%ctest
120+
%else
97121
make test
122+
%endif
123+
%else
124+
: Tests disabled
125+
%endif
98126

99127

100128
%files
101-
%license LICENSE-MIT
102-
%{_libdir}/%{libname}.so.%{soname}*
129+
%license LICENSE
130+
%{_libdir}/%{libname}.so.%{soname}
131+
%{_libdir}/%{libname}.so.%{version}
103132

104133

105134
%files devel
106-
%doc AUTHORS THANKS TODO *.md
135+
%doc AUTHORS THANKS *.md
107136
%doc Examples
108137
%{_libdir}/%{libname}.so
109138
%{_includedir}/amqp*
139+
%{_includedir}/rabbitmq-c
110140
%{_libdir}/pkgconfig/%{libname}.pc
141+
%{_libdir}/cmake/rabbitmq-c
111142

112143
%files tools
113144
%{_bindir}/amqp-*
@@ -116,6 +147,9 @@ make test
116147

117148

118149
%changelog
150+
* Tue Nov 12 2024 Sumit Jena <v-sumitjena@microsoft.com> - 0.14.0-1
151+
- Update to version 0.14.0
152+
119153
* Mon Jan 24 2022 Thomas Crain <thcrain@microsoft.com> - 0.10.0-4
120154
- License verified
121155

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10801,8 +10801,8 @@
1080110801
"type": "other",
1080210802
"other": {
1080310803
"name": "librabbitmq",
10804-
"version": "0.10.0",
10805-
"downloadUrl": "https://github.com/alanxz/rabbitmq-c/archive/ffe918a5fcef72038a88054dca3c56762b1953d4/rabbitmq-c-0.10.0-ffe918a.tar.gz"
10804+
"version": "0.14.0",
10805+
"downloadUrl": "https://github.com/alanxz/rabbitmq-c/archive/124722b5045baa41a24ce2e2d7c52a47467e7ac0/rabbitmq-c-0.14.0-124722b.tar.gz"
1080610806
}
1080710807
}
1080810808
},

0 commit comments

Comments
 (0)