Blob Blame History Raw
%global commit 403d0672999d167c52fb48804034e9c3d69018d4
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global stackname gencpp
Name:           python-%{stackname}
Version:        0.3.4
Release:        3.20130623git%{shortcommit}%{?dist}
Summary:        C++ ROS message and service generators

License:        BSD
URL:            http://ros.org/
Source0:        https://github.com/ros/%{stackname}/archive/%{commit}/%{stackname}-%{version}-%{shortcommit}.tar.gz

# move /usr/etc/langs to /etc/ros-langs
Patch0:         ros-%{stackname}-langs.patch
BuildArch:      noarch

BuildRequires:  cmake
BuildRequires:  python-setuptools
BuildRequires:  catkin-devel
BuildRequires:  python-genmsg-devel

Requires: python-genmsg

%description
gencpp generates ROS C++ messages from message definition files

%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: python-genmsg-devel

%description devel
%{summary}.

%prep
%setup -qn %{stackname}-%{commit}
%patch0 -p1 -b .langs

%build
mkdir build
pushd build
%cmake -DSETUPTOOLS_DEB_LAYOUT=OFF ..
popd

%install
make -C build install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_datadir}/pkgconfig
mv %{buildroot}%{_libdir}/pkgconfig/%{stackname}.pc %{buildroot}/%{_datadir}/pkgconfig

rm -rf %{buildroot}%{_datadir}/%{stackname}/bin

%files
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/ros-langs/%{stackname}
%dir %{_datadir}/%{stackname}
%{_datadir}/%{stackname}/stack.xml
%{_datadir}/%{stackname}/*.template
%{python_sitelib}/%{stackname}
%{python_sitelib}/*egg-info

%files devel
%{_datadir}/%{stackname}/cmake
%{_datadir}/pkgconfig/*.pc


%changelog
* Sun Jun 23 2013 Rich Mattes <richmattes@gmail.com> - 0.3.4-3.20130623git403d067
- Update to match github packaging guidelines
- Create devel subpackage for pkgconfig and cmake scripts
- Fix BuildRequires to match names of packages in Fedora

* Mon Mar 25 2013 Rich Mattes <richmattes@gmail.com> - 0.3.4-2.gite14045c
- Rename to python-gencpp

* Tue Sep 04 2012 Rich Mattes <richmattes@gmail.com> - 0.3.4-1.gite14045c
- Initial package