Blob Blame History Raw
Name:           librealsense
Version:        2.10.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
This project is a cross-platform library (Linux, OSX, Windows) for capturing
data from the Intel RealSense F200, SR300 and R200 cameras. This effort was
initiated to better support researchers, creative coders, and app developers in
domains such as robotics, virtual reality, and the internet of things. Several
often-requested features of RealSense devices are implemented in this project,
including multi-camera capture.


%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.*
%{_datadir}/realsense
%{_libdir}/cmake/realsense2
%{_libdir}/pkgconfig/realsense2.pc
%{_bindir}/*
%{_udevrulesdir}/*

%files devel
%{_includedir}/*
%{_libdir}/librealsense2.so

%files doc
%license LICENSE
%doc doc/doxygen/html/*


%changelog
* 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