%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
Name: player
Version: 3.0.2
Release: 8%{?dist}
Summary: Cross-platform robot device interface and server
Group: Applications/System
License: GPLv2+ and LGPLv2+
URL: http://playerstage.sourceforge.net
Source0: http://downloads.sourceforge.net/project/playerstage/Player/%{version}/%{name}-%{version}.tar.gz
Source1: playernav.desktop
Source2: playercam.desktop
Source3: playerv.desktop
# This patch adds a search directory for plugin libraries, proposed at http://old.nabble.com/Proposal%3A-Plugin-locations-for-Player-and-Stage-ts26868070.html
Patch0: %{name}-3.0.1.fixlibload.patch
Patch1: %{name}-3.0.2.fixunicapimage.patch
Patch2: %{name}-3.0.2.fixlinuxwifi.patch
Patch3: %{name}-3.0.2.fixplayercam.patch
Patch4: %{name}-3.0.2.enablephidget.patch
Patch5: %{name}-3.0.2.s390x.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Sort order: build tools, feature libs, within alphabetically, group related
# entries on single line (most dominant lib first or alphabetically)
# Build tools
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: doxygen, texlive-latex, texlive, texlive-dvips, latex2html
BuildRequires: libtool, libtool-ltdl-devel
# Libs to enable Player features
BuildRequires: alsa-lib-devel
BuildRequires: avahi-compat-howl-devel
BuildRequires: boost-devel boost-thread
BuildRequires: festival-devel
BuildRequires: gearbox-devel
BuildRequires: geos-devel
BuildRequires: gsl-devel
BuildRequires: gstreamer-devel
BuildRequires: gtk2-devel, libgnomecanvas-devel
%ifnarch s390 s390x
BuildRequires: libdc1394-devel, libraw1394-devel
%endif
BuildRequires: libjpeg-devel
BuildRequires: libphidget-devel
BuildRequires: libpqxx-devel
BuildRequires: libstatgrab-devel
BuildRequires: libusb-devel
BuildRequires: libXext-devel
BuildRequires: mesa-libGL-devel, mesa-libGLU-devel
BuildRequires: opencv-devel
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: python, python-devel, swig
BuildRequires: ruby, ruby-devel
BuildRequires: zlib-devel
%description
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 cmake
Requires: boost-devel
Requires: geos-devel
Requires: libtool-ltdl-devel
Requires: zlib-devel
Obsoletes: player-static < 3.0.0
%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
BuildArch: noarch
%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.6
%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. Includes bindings
built against the C and C++ client libraries.
%package examples
Summary: Examples and templates for Player
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description examples
This package contains example code for %{name} development.
Included are sample plugin drivers, and examples made using
the python, C, and C++ client libraries.
%package ruby
Summary: Ruby bindings for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: ruby >= 1.8
%description ruby
This package contains the Ruby client-side bindings for %{name}.
If you would like to build %{name} clients using Ruby you
will need to install this package. Includes bindings built
against the C and C++ client libraries. Ruby bindings
are experimental.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .fixlibload
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p1 -b .s390x
find . -name '*.c' -exec chmod -x {} \;
find . -name '*.cc' -exec chmod -x {} \;
find . -name '*.cpp' -exec chmod -x {} \;
find . -name '*.h' -exec chmod -x {} \;
%build
%cmake -DBUILD_DOCUMENTATION=ON -DBUILD_PLAYERCC=ON -DBUILD_PLAYERCC_BOOST=ON -DBUILD_PYTHONC_BINDINGS=ON -DBUILD_PYTHONCPP_BINDINGS=ON -DBUILD_EXAMPLES=ON -DBUILD_RUBYCPP_BINDINGS=ON -DBoost_USE_MULTITHREAD=ON -DENABLE_DRIVER_OCEANSERVER=OFF -DUNICAP_DIR=/usr .
make
make doc
#pushd doc
#doxygen player.dox
#popd
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{name}
mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/config $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
find $RPM_BUILD_ROOT -name '*.la' -exec rm {} \;
desktop-file-install --vendor="fedora" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE1}
desktop-file-install --vendor="fedora" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE2}
desktop-file-install --vendor="fedora" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE3}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING COPYING.lib README AUTHORS
%{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/config/*
%{_bindir}/player*
%{_bindir}/pmaptest
%{_libdir}/*.so.*
%dir %{_datadir}/player
%{_datadir}/applications/*.desktop
%dir %{_libdir}/player
%files devel
%defattr(-,root,root,-)
%{_includedir}/player-3.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_datadir}/cmake/Modules/*
%files python
%defattr(-,root,root,-)
%{python_sitearch}/*
%files examples
%defattr(-,root,root,-)
%{_datadir}/player/examples
%files doc
%defattr(-,root,root,-)
%doc COPYING
%doc COPYING.lib
%doc doc/*.txt
%doc doc/*.html
%doc doc/player-docs
%files ruby
%defattr (-,root,root,-)
%{ruby_sitearch}/*.so
%changelog
* Wed May 04 2011 Dan Horák <dan[at]danny.cz> - 3.0.2-8
- Add s390x as 64-bit arch
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Feb 07 2011 Thomas Spura <tomspur@fedoraproject.org> - 3.0.2-6
- rebuild for new boost
* Sat Jan 08 2011 Rich Mattes <richmattes@gmail.com> - 3.0.2-5
- Rebuild for OpenCV 2.2
- Fix assertion error in PlayerCam
- Enable libphidget support
* Fri Jul 30 2010 Rich Mattes <richmattes@gmail.com> - 3.0.2-4
- Rebuilt for boost 1.44
* Mon Jul 26 2010 Rich Mattes <richmattes@gmail.com> - 3.0.2-3
- Rebuilt for Python 2.7 mass rebuild
- Restore pmaptest
- Add copyright files to player-doc subpackage
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Jun 29 2010 Rich Mattes <richmattes@gmail.com> - 3.0.2-1
- Upgrade to release 3.0.2
- Remove more supurious BuildRequires
- Add BuildRequires to enable more features
* Sun Jun 26 2010 Rich Mattes <richmattes@gmail.com> - 3.0.1-7
- Rebuild for OpenCV soname change
- Remove unnecessary BuildRequires
* Thu Apr 1 2010 Rich Mattes <richmattes@gmail.com> - 3.0.1-6
- Rebuild for GEOS soname change
* Wed Mar 24 2010 Rich Mattes <richmattes@gmail.com> - 3.0.1-5
- Rebuild for Gearbox drivers
- Added missing Requires for devel package
* Sun Mar 01 2010 Tim Niemueller <tim@niemueller.de> - 3.0.1-4
- Bump EVR for proper F-12 to F-13 upgrade path
* Fri Jan 22 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 3.0.1-2
- Rebuild for Boost soname bump
* Sun Jan 10 2010 Rich Mattes <richmattes@gmail.com> - 3.0.1-1
- Updated to release 3.0.1
- Fixed ruby bindings install path
- Fixed documentation build process
- Added libdir/player to plugin search path
- Fix Rawhide compilation issue by adding -DBoost_USE_MULTITHREAD=ON to cmake
* Sun Nov 08 2009 Tim Niemueller <tim@niemueller.de> - 3.0.0-4
- devel sub-package obsoletes no longer available static sub-package
* Sun Oct 18 2009 Tim Niemueller <tim@niemueller.de> - 3.0.0-3
- Merge Rich's changes with Fedora spec file
* Sat Oct 10 2009 Rich Mattes <richmattes@gmail.com> - 3.0.0-2
- Fixed x86_64 build issues
- Fixed x86_64 library install path
- Fixed mock i586 and x86_64 dep issues
- Enabled Python C++ and Ruby C++ bindings
- Made doc and examples packages .noarch
* Wed Oct 7 2009 Rich Mattes <richmattes@gmail.com> - 3.0.0-1
- Upgrade package to Player 3.0.0
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.1.1-13
- rebuilt with new openssl
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue May 26 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1.1-11
- Exclude -examples subpackage files in main package (#489184).
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 2.1.1-9
- rebuild with new openssl
* Sun Dec 21 2008 Tim Niemueller <tim@niemueller.de> - 2.1.1-8
- Add patch for broken linux/serial.h (thanks to Caolán McNamara)
- Add patch for GCC 4.4 (thanks to Caolán McNamara)
- Rebuild for Python 2.6
* Sat Dec 6 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.1.1-7
- Fix libtool issue
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.1.1-6
- Rebuild for Python 2.6
* Tue Sep 02 2008 Tim Niemueller <tim@niemueller.de> - 2.1.1-5
- Added plugindir patch
* Fri Aug 15 2008 Tim Niemueller <tim@niemueller.de> - 2.1.1-4
- Changed norpath patch, fixes build problem on Fedora 8
- Added libtool BR
- Added autotools BR, needed because for patches of .am files
* Mon Aug 08 2008 Jef Spaleta <jspaleta at fedoraproject dot org> - 2.1.1-3
- Review clean-ups
* Tue Aug 05 2008 Tim Niemueller <tim@niemueller.de> - 2.1.1-2
- Only BR geos-devel on Fedora 9
* Fri Aug 01 2008 Tim Niemueller <tim@niemueller.de> - 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 <tim@niemueller.de> - 2.1.0-0.2.rc2.fc9
- Added subpackages for doc and examples
- Remove *.la files
- Fix BuildRequires
* Thu May 08 2008 Tim Niemueller <tim@niemueller.de> - 2.1.0-0.1.rc2.fc9
- Initial spec file