File librabbitmq4.spec of Package librabbitmq

#
# spec file for package librabbitmq
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           librabbitmq4
Version:        0.10.0
Release:        0
Summary:        C-language AMQP client library
License:        MIT
URL:            https://github.com/alanxz/rabbitmq-c
Source:         rabbitmq-c-v%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  openssl-devel
BuildRequires:  popt-devel
BuildRequires:  xmlto
BuildRequires:  doxygen
BuildRequires:  graphviz

%description
This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker.
- http://github.com/alanxz/rabbitmq-c


%prep
%setup -q -n rabbitmq-c-v%{version}

%build
%cmake -Wno-dev -DBUILD_STATIC_LIBS:BOOL=ON
%cmake_build

%install
%cmake_install

%files
%license LICENSE-MIT
%doc ChangeLog.md README.md
# required for testing but excluded for package
%exclude %{_libdir}/librabbitmq.a
%{_libdir}/librabbitmq.so.4
%{_libdir}/librabbitmq.so.4.4.1

%post
ldconfig

%postun
ldconfig

%package -n rabbitmq-c-tools
Summary: Commandline tools from rabbitmq-c

%description -n rabbitmq-c-tools
Basic amqp tools provided by rabbitmq-c libraries package

%files -n rabbitmq-c-tools
/usr/bin/amqp-consume
/usr/bin/amqp-declare-queue
/usr/bin/amqp-delete-queue
/usr/bin/amqp-get
/usr/bin/amqp-publish

%package -n librabbitmq4-devel
Summary: Include Files and Libraries mandatory for Development
Requires: librabbitmq4 = %{version}

%description -n librabbitmq4-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.


%files -n librabbitmq4-devel
%{_includedir}/amqp.h
%{_includedir}/amqp_framing.h
%{_includedir}/amqp_ssl_socket.h
%{_includedir}/amqp_tcp_socket.h
%{_libdir}/pkgconfig/librabbitmq.pc
%{_libdir}/librabbitmq.so

%changelog
openSUSE Build Service is sponsored by