57c1690
%global commit b87a88aa66853d3c9d901d4e6be729c5fe69aae0
57c1690
%global shortcommit %(c=%{commit}; echo ${c:0:7})
5b0bfb8
5b0bfb8
Name:           hokuyoaist
57c1690
Version:        3.0.2
57c1690
Release:        1%{?dist}
5b0bfb8
Summary:        Hokuyo Laser SCIP driver
5b0bfb8
5b0bfb8
License:        LGPLv3
5b0bfb8
URL:            https://github.com/gbiggs/hokuyoaist
57c1690
Source0:        https://github.com/gbiggs/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
57c1690
Patch0:         %{name}-3.0.2-fedora.patch
57c1690
57c1690
BuildRequires:  boost-devel
5b0bfb8
BuildRequires:  cmake
5b0bfb8
BuildRequires:  doxygen
5b0bfb8
BuildRequires:  flexiport-devel
57c1690
BuildRequires:  graphviz
57c1690
BuildRequires:  python-devel
5b0bfb8
BuildRequires:  python-sphinx
5b0bfb8
5b0bfb8
# Older gearbox versions include the hokuyo_aist library, but the hokuyo 
5b0bfb8
# library in gearbox 10.11 was relicensed to EPL.  This package conflcts 
5b0bfb8
# with gearbox versions that included the hokuyo_aist support (9.11), 
5b0bfb8
# but can be installed in parallel with gearbox version 10.11 (which
5b0bfb8
# is built without hokuyo_aist support)
5b0bfb8
Conflicts:      gearbox < 10.11
5b0bfb8
5b0bfb8
%description
5b0bfb8
This library provides a driver for Hokuyo laser scanner devices using the 
5b0bfb8
SCIP protocol version 1 or 2. It has been tested with the Hokuyo URG-04LX, 
5b0bfb8
UBG-04LX, UHG-08LX, UTM-30LX and UXM-30LX-E but it should work with any 
5b0bfb8
scanner that conforms to these protocol versions, including the URG-04LX-F01 
5b0bfb8
and the URG-04LX-UG01 (Simple-URG).
5b0bfb8
5b0bfb8
%package devel
5b0bfb8
Summary: Header files and libraries for %{name}
57c1690
Requires: %{name}%{?_isa} = %{version}-%{release}
5b0bfb8
5b0bfb8
%description devel
5b0bfb8
Development libraries and header files for %{name}
5b0bfb8
57c1690
%package -n python-%{name}
57c1690
Summary: Python bindings for %{name}
57c1690
Requires: %{name}%{?_isa} = %{version}-%{release}
57c1690
57c1690
%description -n python-%{name}
57c1690
Python bindings for %{name}
57c1690
5b0bfb8
%prep
57c1690
%setup -qn %{name}-%{commit}
57c1690
%patch0 -p0 -b .fedora
5b0bfb8
# Fix the library and pkgconfig install paths.
57c1690
#sed -i 's/\"lib\"/\"%{_lib}\"/' CMakeLists.txt 
5b0bfb8
# The "breathe" module is not available, so don't use it
5b0bfb8
sed -i 's/extensions/#extensions/' doc/conf.py.in
5b0bfb8
5b0bfb8
%build
5b0bfb8
mkdir build
5b0bfb8
pushd build
57c1690
%cmake -DBUILD_EXAMPLES=OFF -DBOOST_LIB_SUFFIX="" ..
5b0bfb8
popd
5b0bfb8
make -C build %{?_smp_mflags}
5b0bfb8
5b0bfb8
%install
5b0bfb8
make -C build install DESTDIR=$RPM_BUILD_ROOT
5b0bfb8
5b0bfb8
# Get rid of hidden junk doxygen generates, and remove the installed
5b0bfb8
# documentation so we can install it with the doc macro
5b0bfb8
rm -rf build/doc/html/.buildinfo
5b0bfb8
rm -rf build/doc/html/.doctrees
5b0bfb8
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-3
5b0bfb8
5b0bfb8
%post -p /sbin/ldconfig
5b0bfb8
5b0bfb8
%postun -p /sbin/ldconfig
5b0bfb8
5b0bfb8
%files
5b0bfb8
%doc COPYING COPYING.LESSER
5b0bfb8
%{_libdir}/*.so.*
5b0bfb8
5b0bfb8
%files devel
5b0bfb8
%doc build/doc/html
5b0bfb8
%{_datadir}/%{name}-3
5b0bfb8
%{_includedir}/%{name}-3
5b0bfb8
%{_libdir}/*.so
5b0bfb8
%{_libdir}/pkgconfig/*.pc
5b0bfb8
%{_libdir}/%{name}
5b0bfb8
57c1690
%files -n python-%{name}
57c1690
%{python_sitearch}/*.so
5b0bfb8
5b0bfb8
%changelog
57c1690
* Tue Mar 25 2014 Rich Mattes <richmattes@gmail.com> - 3.0.2-1
57c1690
- Update to release 3.0.2
57c1690
- Add python bindings
57c1690
e675431
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-2.20120729git69df78b
e675431
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e675431
5b0bfb8
* Sun Jul 29 2012 Rich Mattes <richmattes@gmail.com> - 3.0.1-1.20120729git69df78b
5b0bfb8
- Fix release numbering