%global commit 95ca00d77a6bad85b4719a25575862b964584f34 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global stackname genmsg Name: python-%{stackname} Version: 0.3.10 Release: 4.20130617git%{shortcommit}%{?dist} Summary: Python library for generating ROS message and service data License: BSD URL: http://ros.org/doc/api/genmsg/html/ Source0: https://github.com/ros/%{stackname}/archive/%{commit}/%{stackname}-%{version}-%{shortcommit}.tar.gz #Moves /usr/etc to /etc Patch0: ros-genmsg-etc.patch # Fix documentation to pull version from manifest.xml. Already upstream Patch1: genmsg-0.3.10-docversion.patch BuildArch: noarch BuildRequires: cmake BuildRequires: python-setuptools BuildRequires: python-sphinx BuildRequires: catkin-devel BuildRequires: python-catkin-sphinx %description Project genmsg exists in order to decouple code generation from .msg & .srv format files from the parsing of these files and from implementation details of the build system (project directory layout, existence or nonexistence of utilities like rospack, values of environment variables such as ROS_PACKAGE_PATH): i.e. none of these are required to be set in any particular way. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel %{summary}. %prep %setup -qn %{stackname}-%{commit} %patch0 -p2 -b .etc %patch1 -p1 # Get rid of "ros-theme" for now sed -i 's|html_theme = |#html_theme = |' doc/conf.py %build mkdir build pushd build %cmake .. \ -DSETUPTOOLS_DEB_LAYOUT=OFF popd export PYTHONPATH=$(pwd)/src/genmsg pushd doc make html man rm -r _build/html/.buildinfo popd %install make -C build install DESTDIR=%{buildroot} # This is a noarch pacakge, so the pkgconfig file should be in datadir mkdir -p %{buildroot}%{_datadir}/pkgconfig mv %{buildroot}%{_libdir}/pkgconfig/genmsg.pc %{buildroot}/%{_datadir}/pkgconfig # Create the langs subdirectory so we can own it # Individual language generators register themselves here mkdir -p %{buildroot}/%{_sysconfdir}/ros-langs # Remove the first line (a shebang) since it's not an executable script sed -i '1,1d' %{buildroot}%{python_sitelib}/%{stackname}/gentools.py # Install the manpages mkdir -p %{buildroot}%{_mandir}/man1 install -p -m 0644 doc/_build/man/%{stackname}.1 %{buildroot}%{_mandir}/man1/ %files %doc doc/_build/html %dir %{_datadir}/%{stackname} %{_datadir}/%{stackname}/stack.xml %{python_sitelib}/%{stackname} %{python_sitelib}/*egg-info %dir %{_sysconfdir}/ros-langs %{_mandir}/man1/%{stackname}.1.gz %files devel %{_datadir}/pkgconfig/*.pc %{_datadir}/%{stackname}/cmake %changelog * Sat Jun 22 2013 Rich Mattes - 0.3.10-4.20130617git95ca00d - Build and install html documentation and manpage - Update description to use package description from upstream documentation * Mon Jun 17 2013 Rich Mattes - 0.3.10-3.20130617git95ca00d - Update URL to match github guidelines - Change python-setuptools-devel to python-setuptools - Get rid of rm buildroot at beginning of install - Change RPM_BUILD_ROOT to buildroot macro - Add devel subpackage - Remove the shebang from gentools.py * Mon Mar 25 2013 Rich Mattes - 0.3.10-2.git7859688 - Add requirement on ros-catkin - Change package name to python-genmsg * Tue Sep 04 2012 Rich Mattes - 0.3.10-1.git7859688 - Initial package