234e50
Name: librabbitmq
234e50
Summary: C-language AMQP client library
234e50
Version: 0.8.0
a785b1
Release: 3%{?dist}
234e50
License: MIT
234e50
Group: System Environment/Libraries
234e50
URL: https://github.com/alanxz/rabbitmq-c
234e50
Source0: https://github.com/alanxz/rabbitmq-c/releases/download/v%{version}/rabbitmq-c-%{version}.tar.gz
a785b1
Patch0: rabbitmq-c-0.8.0-CVE-2019-18609.patch
234e50
234e50
BuildRequires: cmake > 2.8
234e50
BuildRequires: openssl-devel
234e50
BuildRequires: popt-devel
234e50
BuildRequires: xmlto
234e50
BuildRequires: doxygen
234e50
234e50
%description
234e50
This is a C-language AMQP client library for use with v2.0+ of
234e50
the RabbitMQ broker.
234e50
234e50
%package devel
234e50
Summary: Header files and development libraries for librabbitmq
234e50
Group: Development/Libraries
234e50
Requires: %{name}%{?_isa} = %{version}-%{release}
234e50
234e50
%description devel
234e50
This package contains the header files and development libraries
234e50
for librabbitmq.
234e50
234e50
%package examples
234e50
Summary: Examples built using the librabbitmq
234e50
Group: Development/Libraries
234e50
Requires: %{name}%{?_isa} = %{version}-%{release}
234e50
234e50
%description examples
234e50
This package contains examples built using librabbitmq.
234e50
234e50
%prep
234e50
%setup -q -n rabbitmq-c-%{version}
a785b1
%patch0 -p1 -b .CVE-2019-18609
234e50
234e50
%build
234e50
%cmake -DBUILD_EXAMPLES:BOOL=ON \
234e50
       -DBUILD_TOOLS_DOCS:BOOL=ON \
234e50
       -DBUILD_STATIC_LIBS:BOOL=ON
234e50
234e50
make %{_smp_mflags}
234e50
234e50
%install
234e50
make install DESTDIR=%{buildroot}
234e50
234e50
# drop static lib, it's only needed for tests
234e50
rm %{buildroot}%{_libdir}/*.a
234e50
234e50
%check
234e50
make test
234e50
234e50
%post -p /sbin/ldconfig
234e50
234e50
%postun -p /sbin/ldconfig
234e50
234e50
234e50
%files
234e50
%license LICENSE-MIT
234e50
%{_libdir}/%{name}.so.*
234e50
234e50
%files devel
234e50
%doc AUTHORS THANKS TODO *.md
234e50
%{_libdir}/%{name}.so
234e50
%{_includedir}/amqp*
234e50
%{_libdir}/pkgconfig/%{name}.pc
234e50
234e50
%files examples
234e50
%{_bindir}/amqp-*
234e50
%doc %{_mandir}/man*/*
234e50
234e50
%changelog
a785b1
* Wed Mar 04 2020 Than Ngo <than@redhat.com> - 0.8.0-3
a785b1
- Resolves: #1809991, CVE-2019-18609 - integer overflow
a785b1
234e50
* Mon Dec 04 2017 Than Ngo <than@redhat.com> - 0.8.0-2
234e50
- Related: #1363736 - fix explicit package version requirement
234e50
234e50
* Wed Nov 29 2017 Than Ngo <than@redhat.com> - 0.8.0-1
234e50
- Initial RPM