File qpid-proton.spec of Package qpid-proton

#
# spec file for package qpid-proton
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#


Name:           qpid-proton
Version:        0.7
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
Patch1:         qpid-proton-0.7-nodatetime.patch
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  epydoc
BuildRequires:  fdupes
BuildRequires:  libuuid-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  python-xml
BuildRequires:  swig >= 2.0.9
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-proton2
Summary:        C library for Qpid Proton
Group:          Development/Libraries/C and C++

%description -n libqpid-proton2
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-proton2 = %{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

%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-proton2 = %{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.

%prep
%setup -q
%patch1 -p1

%build
%cmake -DPROTON_DISABLE_RPATH=true -DSYSINSTALL_PYTHON:BOOL=ON -DSYSINSTALL_PERL:BOOL=ON
make all docs %{?_smp_mflags}

%install
%cmake_install

chmod +x %{buildroot}%{python_sitearch}/_cproton.so

mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/proton-%{version}/docs/* %{buildroot}%{_docdir}/%{name}/
rm -rf %{buildroot}%{_datadir}/proton-%{version}/*
rm -rf %{buildroot}%{perl_archlib}
rm -rf %{buildroot}%{perl_vendorlib}

%fdupes -s %{buildroot}

%post -n libqpid-proton2 -p /sbin/ldconfig

%postun -n libqpid-proton2 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc LICENSE
%doc README
%doc TODO
%{_mandir}/man1/*
%{_bindir}/proton
%{_bindir}/proton-dump
%exclude %{_docdir}/%{name}/api-c
%exclude %{_docdir}/%{name}/api-py

%files -n libqpid-proton2
%defattr(-,root,root)
%{_libdir}/libqpid-proton.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/proton
%{_libdir}/libqpid-proton.so
%{_libdir}/pkgconfig/libqpid-proton.pc
%dir %{_libdir}/cmake/Proton
%{_libdir}/cmake/Proton/*.cmake

%files devel-doc
%defattr(-,root,root)
%dir %{_datadir}/proton
%{_datadir}/proton/examples
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/api-c

%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

%changelog
openSUSE Build Service is sponsored by