LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ignition-transport.spec of Package ignition-transport3 (Project home:awissu:gazebo)

#
# spec file for package ignition-transport
#
# Copyright (c) 2018 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/
#


%define hash add6058e5b8c
%define major 4
%define sover 4-4
Name:           ignition-transport
Version:        4.0.0
Release:        0
Summary:        Ignition Robotics Transport Library
License:        Apache-2.0
Group:          Productivity/Scientific/Other
URL:            http://ignitionrobotics.org
Source0:        https://bitbucket.org/ignitionrobotics/ign-transport/get/%{name}_%{version}.tar.bz2#/ignitionrobotics-ign-transport-%{hash}.tar.bz2
BuildRequires:  cmake
BuildRequires:  cppzmq-devel
BuildRequires:  gcc-c++
BuildRequires:  googletest-devel
BuildRequires:  ignition-cmake-modules
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(ignition-math4)
BuildRequires:  pkgconfig(ignition-msgs1)
BuildRequires:  pkgconfig(libzmq)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(protobuf-lite)
BuildRequires:  pkgconfig(uuid)
BuildRequires:  rubygem(%{rb_default_ruby_abi}:ronn)

%description
The transport library combines ZeroMQ with Protobufs to create a fast and
efficient message passing system. Asynchronous message publication and
subscription is provided along with service calls and discovery.

%package -n     libignition-transport%{sover}
Summary:        C++ library for %{name}
Group:          System/Libraries

%description -n libignition-transport%{sover}
The transport library combines ZeroMQ with Protobufs to create a fast and
efficient message passing system. Asynchronous message publication and
subscription is provided along with service calls and discovery.

This package contains the shared library.

%package        ruby
Summary:        The ruby command line library
Group:          System/Libraries
Requires:       libignition-transport%{sover}

%description    ruby
The transport library combines ZeroMQ with Protobufs to create a fast and
efficient message passing system. Asynchronous message publication and
subscription is provided along with service calls and discovery.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       libignition-transport%{sover} = %{version}

%description    devel
Ignition Robotics Transport Library.

This package contains the header files and libraries needed to develop
application that use %{name}.

%prep
%setup -q -n ignitionrobotics-ign-transport-%{hash}

%build
export CFLAGS="%{optflags} -pthread"
%ifarch %{ix86}
export CFLAGS="${CFLAGS} -msse2 -mfpmath=sse"
%endif
export CXXFLAGS="${CFLAGS}"
%cmake \
    -DUSE_HOST_SSE_FLAGS=OFF \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${CXXFLAGS}"

%make_jobs

%install
%cmake_install

# Install the ruby command line library in ruby-stdlib
mkdir -p %{buildroot}%{rb_libdir}/ignition
mv %{buildroot}{%{_libexecdir}/ruby/ignition,%{rb_libdir}/ignition}/cmdtransport%{major}.rb
sed -e '/library_path/s|[^: ]*$|%{rb_libdir}/ignition/cmdtransport{major}|' \
    -i $(grep -rl 'library_path' %{buildroot}%{_datadir}/ignition/transport%{major}.yaml)

%post -n libignition-transport%{sover} -p /sbin/ldconfig
%postun -n libignition-transport%{sover} -p /sbin/ldconfig

%files -n libignition-transport%{sover}
%license COPYING
%doc AUTHORS Changelog.md README.md
%{_libdir}/libignition-transport*.so.*

%files ruby
%dir %{_datadir}/ignition
%dir %{rb_libdir}/ignition
%{_datadir}/ignition/transport%{major}.yaml
%attr(0755,root,root) %{rb_libdir}/ignition/cmdtransport%{major}.rb

%files devel
%dir %{_includedir}/ignition
%{_includedir}/ignition/transport%{major}/
%{_libdir}/cmake/ignition-transport%{major}/
%{_libdir}/libignition-transport%{major}.so
%{_libdir}/pkgconfig/ignition-transport%{major}.pc

%changelog