LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dart.spec of Package dart5 (Project home:awissu:gazebo)

#
# spec file for package dart
#
# 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/
#


%define sover   5_1
%define osgdart osgDart
Name:           dart
Version:        5.1.5
Release:        0
Summary:        Dynamic Animation and Robotics Toolkit
License:        BSD-2-Clause
Group:          Productivity/Scientific/Other
Url:            http://dartsim.github.io/
Source0:        https://github.com/dartsim/dart/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE optflags.patch avvissu@yandex.ru -- Use optflags when building
Patch0:         dart-5.1.1_optflags.patch
# PATCH-FIX-UPSTREAM libdir.patch avvissu@yandex.ru -- Change path to libdir
Patch1:         dart-5.1.1_libdir.patch
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  tinyxml-devel
BuildRequires:  pkgconfig(assimp)
BuildRequires:  pkgconfig(ccd)
BuildRequires:  pkgconfig(eigen3)
BuildRequires:  pkgconfig(fcl)
BuildRequires:  pkgconfig(flann)
BuildRequires:  pkgconfig(openscenegraph)
BuildRequires:  pkgconfig(openthreads)
BuildRequires:  pkgconfig(tinyxml2)
BuildRequires:  pkgconfig(urdfdom)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xmu)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The library provides data structures and algorithms for kinematic and
dynamic applications in robotics and computer animation. DART is
distinguished by its accuracy and stability due to its use of generalized
coordinates to represent articulated rigid body systems and Featherstone's
Articulated Body Algorithm to compute the dynamics of motion.

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

%description -n lib%{name}%{sover}
The library provides data structures and algorithms for kinematic and
dynamic applications in robotics and computer animation. DART is
distinguished by its accuracy and stability due to its use of generalized
coordinates to represent articulated rigid body systems and Featherstone's
Articulated Body Algorithm to compute the dynamics of motion.

This package contains the shared library.

%package -n     lib%{name}-core%{sover}
Summary:        The Core library of %{name}
Group:          System/Libraries

%description -n lib%{name}-core%{sover}
The library provides data structures and algorithms for kinematic and
dynamic applications in robotics and computer animation. DART is
distinguished by its accuracy and stability due to its use of generalized
coordinates to represent articulated rigid body systems and Featherstone's
Articulated Body Algorithm to compute the dynamics of motion.

This package contains the shared library.

%package -n     lib%{osgdart}%{sover}
Summary:        C++ library for osgDart support
Group:          System/Libraries

%description -n lib%{osgdart}%{sover}
The library provides data structures and algorithms for kinematic and
dynamic applications in robotics and computer animation. DART is
distinguished by its accuracy and stability due to its use of generalized
coordinates to represent articulated rigid body systems and Featherstone's
Articulated Body Algorithm to compute the dynamics of motion..

This package contains the shared library.

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

%description    devel
Dynamic Animation and Robotics Toolkit.

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

%package  -n    %{name}-core-devel
Summary:        Development files for %{name}-core
Group:          Development/Libraries/C and C++
Requires:       lib%{name}-core%{sover} = %{version}
Requires:       pkgconfig(assimp)
Requires:       pkgconfig(eigen3)
Requires:       pkgconfig(fcl)

%description -n %{name}-core-devel
Dynamic Animation and Robotics Toolkit.

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

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

%description -n %{osgdart}-devel
Dynamic Animation and Robotics Toolkit.

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

%prep
%setup -q
%patch0 -p1
%patch1 -p1

# Change cflags
! sed -e '/^Cflags/s|[^:]\+$|\ -I\$\{includedir\}|;/\$.includedir/q1' \
-i cmake/dart.pc.in || exit 1

%build
%cmake \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DDART_BUILD_EXAMPLES=OFF

# Out of memory: remove %%{?_smp_mflags}
make -j2

%install
%cmake_install

%post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%post -n lib%{name}-core%{sover} -p /sbin/ldconfig
%postun -n lib%{name}-core%{sover} -p /sbin/ldconfig
%post -n lib%{osgdart}%{sover} -p /sbin/ldconfig
%postun -n lib%{osgdart}%{sover} -p /sbin/ldconfig

%files -n lib%{name}%{sover}
%defattr(-,root,root)
%{_libdir}/lib%{name}.so.*

%files -n lib%{name}-core%{sover}
%defattr(-,root,root)
%doc LICENSE Changelog.md
%{_libdir}/lib%{name}-core.so.*

%files -n lib%{osgdart}%{sover}
%defattr(-,root,root)
%{_libdir}/lib%{osgdart}.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/gui/
%{_includedir}/%{name}/planning/
%{_includedir}/%{name}/utils/
%{_includedir}/%{name}/dart.h
%{_libdir}/lib%{name}.so
%{_datadir}/%{name}/DART*.cmake

%files -n %{name}-core-devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/collision/
%{_includedir}/%{name}/common/
%{_includedir}/%{name}/constraint/
%{_includedir}/%{name}/dynamics/
%{_includedir}/%{name}/integration/
%{_includedir}/%{name}/lcpsolver/
%{_includedir}/%{name}/math/
%{_includedir}/%{name}/optimizer/
%{_includedir}/%{name}/renderer/
%{_includedir}/%{name}/simulation/
%{_includedir}/%{name}/config.h
%{_includedir}/%{name}/dart-core.h
%{_libdir}/lib%{name}-core.so
%{_libdir}/pkgconfig/%{name}.pc
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}core
%{_datadir}/%{name}/package.xml
%{_datadir}/%{name}core/DARTCore*.cmake

%files -n %{osgdart}-devel
%defattr(-,root,root)
%{_includedir}/%{osgdart}/
%{_libdir}/lib%{osgdart}.so

%changelog