Blob Blame History Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           player
Version:        2.1.1
Release:        3%{?dist}
Summary:        Cross-platform robot device interface and server

Group:          Applications/System
License:        GPLv2+ and LGPLv2+
Source1:        playernav.desktop 
Source2:        playercam.desktop 
Source3:        playerv.desktop 
Patch0:         %{name}-2.1.1-gcc43.patch
Patch1:         %{name}-2.1.0rc2-norpath.patch
Patch2:         %{name}-2.1.0rc2-paths.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libtool-ltdl-devel
%if 0%{?fedora} <= 9
BuildRequires:  geos-devel
BuildRequires:  libraw1394-devel, libdc1394-devel
BuildRequires:  opencv-devel
BuildRequires:  alsa-lib-devel
BuildRequires:  libstatgrab-devel
BuildRequires:  libpqxx-devel
BuildRequires:  gsl-devel
BuildRequires:  python, python-devel, swig
BuildRequires:  libjpeg-devel
BuildRequires:  openssl-devel
BuildRequires:  ImageMagick-devel
BuildRequires:  gtk2-devel, libgnomecanvas-devel
BuildRequires:  mesa-libGL-devel, freeglut-devel
BuildRequires:  boost-devel
BuildRequires:  avahi-compat-howl-devel
BuildRequires:  zlib-devel
BuildRequires:  doxygen, graphviz
BuildRequires: desktop-file-utils

Player is a network server for robot control. Running on your robot, Player
provides a clean and simple interface to the robot's sensors and actuators
over the IP network. Your client program talks to Player over a TCP socket,
reading data from sensors, writing commmands to actuators, and configuring
devices on the fly. Player supports a variety of robot hardware.

%package devel
Summary: Header files and libraries for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig

%description devel
This package contains the header files and libraries
for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.

%package doc
Summary: Development documentation for Player
Group: Documentation

%description doc
This package contains the development documentation for Player.

%package python
Summary: Player Python bindings
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python >= 2.5

%description python
This package contains the Python bindings for %{name}.
If you like to develop programs using %{name} in Python
you will need to install this package.

%package examples
Summary:  Examples for Player
Group:    Development/Tools
Requires: %{name} = %{version}-%{release}

%description examples
This package contains examples for Player.

%package static
Summary: Static libraries for %{name}
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}

%description static
This package contains static libraries that can be used to
compile static binaries using Player.

%setup -q -n %{name}-%{version}
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .norpath
%patch2 -p1 -b .paths

# Broken: --enable-alsa --enable-sonartoranger --enable-lasertoranger
find ./ -name '*.c' -exec chmod a-x {} \;
find ./ -name '*.cc' -exec chmod a-x {} \;
find ./ -name '*.cpp' -exec chmod a-x {} \;
find ./ -name '*.h' -exec chmod a-x {} \;
%configure --enable-playersd
# Get rid of rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# no smp flags, does not work properly: %{?_smp_mflags}
pushd doc
doxygen player.dox

for f in `ls $RPM_BUILD_ROOT%{_bindir}/player*.py`; do mv $f $RPM_BUILD_ROOT%{_bindir}/`basename $f | awk -F. '{ print $1 }'`; done
rm -rf $RPM_BUILD_ROOT%{_datadir}/player/java
find $RPM_BUILD_ROOT -name '*.la' -exec rm {} \;
rm -f $RPM_BUILD_ROOT%{_bindir}/*.pyc
rm -f $RPM_BUILD_ROOT%{_bindir}/*.pyo
#mv $RPM_BUILD_ROOT%{_libdir}/player/examples $RPM_BUILD_ROOT%{_datadir}/player/examples

desktop-file-install --vendor="fedora"               \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \

desktop-file-install --vendor="fedora"               \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \

desktop-file-install --vendor="fedora"               \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%config(noreplace) %{_sysconfdir}/player
%dir %{_datadir}/player
%dir %{_libdir}/player

%files python

%files devel

%files examples

%files doc
%doc doc/*.txt
%doc doc/*.html
%doc doc/player-docs

%files static

* Mon Aug 08 2008 Jef Spaleta <jspaleta at fedoraproject dot org> - 2.1.1-3
- Review clean-ups

* Tue Aug 05 2008 Tim Niemueller <> - 2.1.1-2
- Only BR geos-devel on Fedora 9

* Fri Aug 01 2008 Tim Niemueller <> - 2.1.1-1
- Upgrade to 2.1.1

* Mon Jun 23 2008 Jef Spaleta <jspaleta at fedoraproject dot org> - 2.1.0-0.3.rc2.fc9
- Review clean-ups

* Thu May 22 2008 Tim Niemueller <> - 2.1.0-0.2.rc2.fc9
- Added subpackages for doc and examples
- Remove *.la files
- Fix BuildRequires

* Thu May 08 2008 Tim Niemueller <> - 2.1.0-0.1.rc2.fc9
- Initial spec file