Name: librealsense
Version: 2.15.0
Release: 1%{?dist}
Summary: Cross-platform camera capture for Intel RealSense
License: ASL 2.0 and BSD
URL: https://github.com/IntelRealSense/librealsense
Source0: https://github.com/IntelRealSense/librealsense/archive/v%{version}.tar.gz#/librealsense-%{version}.tar.gz
# Remove custom CFLAGS that override ours.
# This was discussed with upstream, but upstream wants to keep those flags.
Patch0: librealsense.remove-cflags.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: glfw-devel
BuildRequires: libGL-devel
BuildRequires: libusb-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libudev)
%description
The Intel RealSense SDK is a cross-platform library (Linux, OSX, Windows) for
capturing data from the Intel RealSense D400 and SR 300 depth cameras.
For older devices (F200, R200, LR200, ZR300), please use librealsense1.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation for %{name}
%description doc
The %{name}-doc package contains documentation for developing applications
with %{name}.
# enable PIE, we need -fPIC anyway
%global _hardened_build 1
%prep
%autosetup -p1
%build
mkdir -p build
pushd build
%cmake \
-DBUILD_UNIT_TESTS=NO \
-DCMAKE_INSTALL_BINDIR=%{_bindir} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
..
%make_build
popd
sed -i "s:/usr/local/bin:%{_datadir}/realsense:" config/*
sed -i "s/plugdev/users/g" config/*rules
pushd doc/doxygen
# Do not generate Windows help files
sed -i \
-e "s/GENERATE_HTMLHELP[[:space:]]*=[[:space:]]*YES/GENERATE_HTMLHELP = NO/" \
doxyfile
doxygen
%install
pushd build
%make_install
popd
mkdir -p %{buildroot}/%{_udevrulesdir}
install -p -m644 config/99-realsense-libusb.rules %{buildroot}/%{_udevrulesdir}
mkdir -p %{buildroot}/%{_datadir}/realsense
install -p -m755 config/usb-R200-in{,_udev} %{buildroot}/%{_datadir}/realsense
find %{buildroot} -name "*.a" -delete
%files
%license LICENSE
%doc readme.md
%{_libdir}/librealsense2.so.2*
%{_datadir}/realsense
%{_libdir}/cmake/realsense2
%{_bindir}/realsense-viewer
%{_bindir}/rs-align
%{_bindir}/rs-capture
%{_bindir}/rs-color
%{_bindir}/rs-convert
%{_bindir}/rs-data-collect
%{_bindir}/rs-depth
%{_bindir}/rs-depth-quality
%{_bindir}/rs-distance
%{_bindir}/rs-enumerate-devices
%{_bindir}/rs-fw-logger
%{_bindir}/rs-measure
%{_bindir}/rs-multicam
%{_bindir}/rs-pointcloud
%{_bindir}/rs-post-processing
%{_bindir}/rs-record-playback
%{_bindir}/rs-rosbag-inspector
%{_bindir}/rs-save-to-disk
%{_bindir}/rs-sensor-control
%{_bindir}/rs-software-device
%{_bindir}/rs-terminal
%{_udevrulesdir}/99-realsense-libusb.rules
%files devel
%{_includedir}/librealsense2
%{_libdir}/librealsense2.so
%{_libdir}/pkgconfig/realsense2.pc
%files doc
%license LICENSE
%doc doc/doxygen/html/*
%changelog
* Mon Aug 13 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.15.0-1
- Update to 2.15.0
* Fri Jul 27 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.14.1-1
- Update to 2.14.1
* Wed Jul 18 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.14.0-1
- Update to 2.14.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 23 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.13.0-1
- Update to 2.13.0
* Tue Jun 05 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.12.0-1
- Update to 2.12.0
* Wed May 23 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.11.1-1
- Update to latest release 2.11.1
* Fri Apr 06 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.10.3-2
- Move pkgconfig file to devel subpackge
* Fri Apr 06 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.10.3-1
- Update to 2.10.3
* Sat Mar 03 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.10.1-1
- Update to 2.10.1
* Fri Feb 09 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.10.0-1
- Update to 2.10.0
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 26 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.9.1-1
- Update to 2.9.1
* Mon Jan 01 2018 Till Hofmann <thofmann@fedoraproject.org> - 2.9.0-1
- Update to 2.9.0
- Remove upstreamed patch to fix format-security
- Remove all "*.a" files
- Use BR: pkgconfig(libudev) instead of BR: systemd
- Add license file to doc subpackage
* Sat Dec 16 2017 Till Hofmann <thofmann@fedoraproject.org> - 2.8.3-1
- Update to latest release
- Remove upstreamed patch for missing includes
- Add patch to fix format-security
* Tue Sep 26 2017 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 2.7.9-0.2
- Add patch to remove Threads from the pkgconfig requirements
* Mon Sep 18 2017 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 2.7.9-0.1
- Update to librealsense2 alpha release
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
* Wed Mar 22 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-7
- Add missing BR: gcc-c++
* Wed Mar 22 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-6
- Add patch for missing include of sys/time.h to fix build error on ppc64
* Wed Mar 22 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-5
- Add patch for missing include of functional header
* Sat Jan 21 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-4
- Add patch to remove any CFLAGS modification in cmake
- Change License to "ASL 2.0 and BSD"
- Remove trademarks from description
* Mon Jan 16 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-3
- Install bash scripts into datadir, not into libdir
* Mon Jan 16 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-2
- Add patch to fix build flags on arm
* Mon Jan 16 2017 Till Hofmann <till.hofmann@posteo.de> - 1.12.1-1
- Update to 1.12.1
- Switch to cmake for building the package
* Mon Jan 16 2017 Till Hofmann <till.hofmann@posteo.de> - 1.9.7-2
- Fix paths in udev rules
* Mon Aug 29 2016 Till Hofmann <till.hofmann@posteo.de> - 1.9.7-1
- Initial package