# spec file for librabbitmq # # Copyright (c) 2012-2014 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/3.0/ # # Please, preserve the changelog entries # Name: librabbitmq Summary: Client library for AMQP Version: 0.5.2 Release: 2%{?dist} License: MIT Group: System Environment/Libraries URL: https://github.com/alanxz/rabbitmq-c Source0: https://github.com/alanxz/rabbitmq-c/releases/download/v%{version}/rabbitmq-c-%{version}.tar.gz Patch0: rabbitmq-c-0.5.2-CVE-2019-18609.patch BuildRequires: libtool BuildRequires: openssl-devel # For tools BuildRequires: popt-devel # For man page BuildRequires: xmlto %description This is a C-language AMQP client library for use with AMQP servers speaking protocol versions 0-9-1. %package devel Summary: Header files and development libraries for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the header files and development libraries for %{name}. %package tools Summary: Example tools built using the librabbitmq package Group: Development/Libraries Requires: %{name}%{?_isa} = %{version} %description tools This package contains example tools built using %{name}. It provides: amqp-consume Consume messages from a queue on an AMQP server amqp-declare-queue Declare a queue on an AMQP server amqp-delete-queue Delete a queue from an AMQP server amqp-get Get a message from a queue on an AMQP server amqp-publish Publish a message on an AMQP server %prep %setup -q -n rabbitmq-c-%{version} %patch0 -p1 -b .CVE-2019-18609 # Copy sources to be included in -devel docs. cp -pr examples Examples %build autoreconf -i %configure \ --enable-tools \ --enable-docs \ --with-ssl=openssl # rpath removal sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{_smp_mflags} %install make install DESTDIR="%{buildroot}" rm %{buildroot}%{_libdir}/%{name}.la %check : check .pc is usable grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1 : upstream tests export LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %{!?_licensedir:%global license %%doc} %license LICENSE-MIT %{_libdir}/%{name}.so.1* %files devel %doc AUTHORS THANKS TODO *.md %doc Examples %{_libdir}/%{name}.so %{_includedir}/amqp* %{_libdir}/pkgconfig/librabbitmq.pc %files tools %{_bindir}/amqp-* %doc %{_mandir}/man1/amqp-*.1* %doc %{_mandir}/man7/librabbitmq-tools.7* %changelog * Thu Apr 02 2020 Than Ngo - 0.5.2-2 - Resolves: #1809991 - CVE-2019-18609, integer overflow * Mon Sep 15 2014 Remi Collet - 0.5.2-1 - update to 0.5.2 * Wed Aug 13 2014 Remi Collet - 0.5.1-1 - update to 0.5.1 - fix license handling - move all documentation in devel subpackage * Tue Apr 15 2014 Remi Collet - 0.5.0-2 - upstream patch for missing function * Mon Feb 17 2014 Remi Collet - 0.5.0-1 - update to 0.5.0 - open https://github.com/alanxz/rabbitmq-c/issues/169 (version is 0.5.1-pre) - open https://github.com/alanxz/rabbitmq-c/issues/170 (amqp_get_server_properties) - drop BR python-simplejson - add ssl support * Thu Aug 1 2013 Remi Collet - 0.3.0-1 - update to 0.3.0 - create sub-package for tools - License is now MIT * Sun Mar 11 2012 Remi Collet - 0.1-0.2.hgfb6fca832fd2 - add %%check (per review comment) * Sat Mar 10 2012 Remi Collet - 0.1-0.1.hgfb6fca832fd2 - Initial RPM