LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package ignition-transport
#
# Copyright (c) 2016 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 1c8b666e9cb3
%define src_name ignitionrobotics-ign-transport
%define major 2
%define sover 2-2
%define prjname ignition
Name:           ignition-transport%{major}
Version:        2.1.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#/%{src_name}-%{hash}.tar.bz2
BuildRequires:  cmake
BuildRequires:  cppzmq-devel
BuildRequires:  gcc-c++
BuildRequires:  googletest-devel
BuildRequires:  pkg-config
BuildRequires:  rubygem(%rb_default_ruby_abi:ronn)
BuildRequires:  pkgconfig(libzmq)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(protobuf-lite)
BuildRequires:  pkgconfig(uuid)
BuildRequires:  pkgconfig(ignition-msgs0)
BuildRequires:  pkgconfig(ignition-math2)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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 %{src_name}-%{hash}

# Fix: IGNITION-TRANSPORT is not installed properly
sed -e '/CMAKE_INSTALL_LIBDIR/s/@CMAKE_INSTALL_PREFIX@//' \
	-i cmake/ignition-config.cmake.in

%build
export CFLAGS="%{optflags} -pthread"
%ifarch %ix86
export CFLAGS="${CFLAGS} -pthread -msse2 -mfpmath=sse"
%endif
export CXXFLAGS="${CFLAGS}"
%cmake \
    -DUSE_HOST_CFLAGS=OFF \
    -DUSE_UPSTREAM_CFLAGS=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}
%defattr(-,root,root)
%doc AUTHORS COPYING LICENSE NEWS
%{_libdir}/lib%{prjname}*.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