File qpid-proton.spec of Package qpid-proton
#
# spec file for package qpid-proton
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%global qpid_proton_soversion 10
Name: qpid-proton
Version: 0.16.0
Release: 0
Summary: A high performance, lightweight messaging library
License: Apache-2.0
Group: Productivity/Networking/Other
Url: http://qpid.apache.org/proton/
Source0: http://www.apache.org/dist/qpid/proton/%{version}/%{name}-%{version}.tar.gz
Patch101: qpid-proton-0.9-pthread.patch
Patch102: qpid-proton-0.16.0-gcc7.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: epydoc
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libuuid-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: python-xml
BuildRequires: swig >= 2.0.9
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::More)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n libqpid-proton%{qpid_proton_soversion}
Summary: C library for Qpid Proton
Group: Development/Libraries/C and C++
%description -n libqpid-proton%{qpid_proton_soversion}
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n libqpid-proton-cpp%{qpid_proton_soversion}
Summary: C++ library for Qpid Proton
Group: Development/Libraries/C and C++
%description -n libqpid-proton-cpp%{qpid_proton_soversion}
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package devel
Summary: Development libraries for writing messaging apps with Qpid Proton
Group: Development/Libraries/C and C++
Requires: libqpid-proton%{qpid_proton_soversion} = %{version}-%{release}
Requires: libqpid-proton-cpp%{qpid_proton_soversion} = %{version}-%{release}
%description devel
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package devel-doc
Summary: Documentation for the C development libraries for Qpid Proton
Group: Documentation/Other
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description devel-doc
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n python-qpid-proton
Summary: Python language bindings for the Qpid Proton messaging framework
Group: Development/Libraries/Python
Requires: libqpid-proton%{qpid_proton_soversion} = %{version}-%{release}
Requires: python = %{python_version}
%description -n python-qpid-proton
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n python-qpid-proton-doc
Summary: Documentation for the Python language bindings for Qpid Proton
Group: Documentation/Other
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description -n python-qpid-proton-doc
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n perl-qpid-proton
Summary: Perl language bindings for Qpid Proton messaging framework
Group: Development/Libraries/Perl
Requires: libqpid-proton%{qpid_proton_soversion} = %{version}-%{release}
Requires: perl = %{perl_version}
%description -n perl-qpid-proton
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%prep
%setup -q
%patch101 -p1
%patch102 -p1
%build
%cmake \
-DPROTON_DISABLE_RPATH=true \
-DPYTHON_SITEARCH_PACKAGES=%{python_sitearch} \
-DNOBUILD_RUBY=1 \
-DNOBUILD_PHP=1 \
-DSYSINSTALL_PERL=1 \
-DSYSINSTALL_PYTHON=1 \
-DCHECK_SYSINSTALL_PYTHON=0
make all docs %{?_smp_mflags}
%install
%cmake_install
chmod +x %{buildroot}%{python_sitearch}/*_cproton.so
find %{buildroot}%{_datadir}/proton-%{version}/examples/ -type f | xargs chmod -x
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/proton-%{version}/docs/* %{buildroot}%{_docdir}/%{name}/
%fdupes -s %{buildroot}
%post -n libqpid-proton%{qpid_proton_soversion} -p /sbin/ldconfig
%postun -n libqpid-proton%{qpid_proton_soversion} -p /sbin/ldconfig
%post -n libqpid-proton-cpp%{qpid_proton_soversion} -p /sbin/ldconfig
%postun -n libqpid-proton-cpp%{qpid_proton_soversion} -p /sbin/ldconfig
%files -n libqpid-proton%{qpid_proton_soversion}
%defattr(-,root,root)
%{_libdir}/libqpid-proton.so.*
%files -n libqpid-proton-cpp%{qpid_proton_soversion}
%defattr(-,root,root)
%{_libdir}/libqpid-proton-cpp.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/proton
%{_libdir}/libqpid-proton.so
%{_libdir}/libqpid-proton-cpp.so
%{_libdir}/pkgconfig/libqpid-proton.pc
%{_libdir}/pkgconfig/libqpid-proton-core.pc
%{_libdir}/pkgconfig/libqpid-proton-cpp.pc
%dir %{_libdir}/cmake/Proton
%dir %{_libdir}/cmake/ProtonCpp
%{_libdir}/cmake/Proton/*.cmake
%{_libdir}/cmake/ProtonCpp/*.cmake
%files devel-doc
%defattr(-,root,root)
%dir %{_datadir}/proton-%{version}
%doc %{_datadir}/proton-%{version}/LICENSE
%doc %{_datadir}/proton-%{version}/README.md
%{_datadir}/proton-%{version}/examples
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/api-c
%{_docdir}/%{name}/api-cpp
%files -n python-qpid-proton
%defattr(-,root,root)
%{python_sitearch}/*_cproton.so
%{python_sitearch}/cproton.*
%{python_sitearch}/proton
%files -n python-qpid-proton-doc
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/api-py
%files -n perl-qpid-proton
%defattr(-,root,root)
%{perl_vendorarch}/*
%changelog