%global gitrev 69df78b
Name: hokuyoaist
Version: 3.0.1
Release: 1.20120729git%{gitrev}%{?dist}
Summary: Hokuyo Laser SCIP driver
License: LGPLv3
URL: https://github.com/gbiggs/hokuyoaist
# wget --content-disposition https://github.com/gbiggs/hokuyoaist/tarball/tags/3.0.1
Source0: https://github.com/gbiggs/hokuyoaist/tarball/tags/%{version}/gbiggs-hokuyoaist-%{version}-0-g%{gitrev}.tar.gz
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: flexiport-devel
BuildRequires: python-sphinx
# Older gearbox versions include the hokuyo_aist library, but the hokuyo
# library in gearbox 10.11 was relicensed to EPL. This package conflcts
# with gearbox versions that included the hokuyo_aist support (9.11),
# but can be installed in parallel with gearbox version 10.11 (which
# is built without hokuyo_aist support)
Conflicts: gearbox < 10.11
%description
This library provides a driver for Hokuyo laser scanner devices using the
SCIP protocol version 1 or 2. It has been tested with the Hokuyo URG-04LX,
UBG-04LX, UHG-08LX, UTM-30LX and UXM-30LX-E but it should work with any
scanner that conforms to these protocol versions, including the URG-04LX-F01
and the URG-04LX-UG01 (Simple-URG).
%package devel
Summary: Header files and libraries for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
Development libraries and header files for %{name}
%prep
%setup -q -n gbiggs-%{name}-32e8771
# Fix the library and pkgconfig install paths.
sed -i 's/\"lib\"/\"%{_lib}\"/' CMakeLists.txt
# The "breathe" module is not available, so don't use it
sed -i 's/extensions/#extensions/' doc/conf.py.in
%build
mkdir build
pushd build
%cmake -DBUILD_EXAMPLES=OFF ..
popd
make -C build %{?_smp_mflags}
%install
make -C build install DESTDIR=$RPM_BUILD_ROOT
# Get rid of hidden junk doxygen generates, and remove the installed
# documentation so we can install it with the doc macro
rm -rf build/doc/html/.buildinfo
rm -rf build/doc/html/.doctrees
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-3
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc COPYING COPYING.LESSER
%{_libdir}/*.so.*
%files devel
%doc build/doc/html
%{_datadir}/%{name}-3
%{_includedir}/%{name}-3
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}
%changelog
* Sun Jul 29 2012 Rich Mattes <richmattes@gmail.com> - 3.0.1-1.20120729git69df78b
- Fix release numbering