File rosparam.spec of Package rosparam

#
# spec file for package rosparam
#
# Copyright (c) 2010 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/
#

# norootforbuild

Name:           rosparam
Version:        1.9.41
Release:        0
Summary:        rosparam contains the rosparam command-line tool for getting and     sett [...]

License:        BSD
URL:            http://ros.org/wiki/rosparam
Source0:        https://github.com/ros-gbp/ros_comm-release/archive/release/rosparam/1.9.41.tar.gz
Source1:        rosparam.rpmlintrc
Group:          Libraries/Research

BuildRequires:  pkg-config
BuildRequires:  catkin

Requires:       python-yaml
Requires:       rosgraph

%description
rosparam contains the rosparam command-line tool for getting and
    setting ROS Parameters on the

%prep
%setup -q -n ros_comm-release-release-rosparam-1.9.41

mkdir ../rosparam
mv * ../rosparam

mkdir -p src/rosparam
mv ../rosparam src

%build
catkin_make -DSETUPTOOLS_DEB_LAYOUT="OFF" \
            -DCMAKE_INSTALL_PREFIX=%{_prefix} \
            -DCMAKE_PREFIX_PATH=%{_prefix}

%install
catkin_make install -DCMAKE_INSTALL_PREFIX=%{_prefix} DESTDIR=%{buildroot}

root=%{buildroot}/%{_prefix}
rm ${root}/.catkin
rm ${root}/.rosinstall
rm ${root}/env.sh
rm ${root}/_setup_util.py
rm ${root}/setup.*

mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_sysconfdir}
mkdir -p %{buildroot}/%{python_sitelib}

mkdir -p %{buildroot}/%{_includedir}
mkdir -p %{buildroot}/%{_libdir}

if [ -d ${root}/etc ]; then
  mv ${root}/etc %{buildroot}/%{_sysconfdir}
fi
if [ "%{_lib}" == "lib64" ]; then
  mv ${root}/lib/* %{buildroot}/%{_libdir}
  mv %{buildroot}/%{_libdir}/python* ${root}/lib/
fi

%files
%defattr(-,root,root,-)
%{_bindir}
%{_sysconfdir}
%{_datadir}
%{python_sitelib}

%{_includedir}
%{_libdir}

%changelog
openSUSE Build Service is sponsored by