1bee53d
%global commit 88166014859c09f6ad6a93f0862bdcc4e46dc87e
8454871
%global shortcommit %(c=%{commit}; echo ${c:0:7})
8454871
8efccae
%{?filter_setup:
8efccae
%filter_provides_in %{python_sitearch}/.*\.so$
8efccae
%filter_setup
8efccae
}
8efccae
8efccae
Name:           libfreenect
1bee53d
Version:        0.5.7
cabca34
Release:        7%{?dist}
8efccae
Summary:        Device driver for the Kinect
5ab6bce
# Core libfreenect is available as ASL 2.0 OR GPLv2
5ab6bce
# OpenNI driver is available as ASL 2.0
5ab6bce
License:        ASL 2.0 and (GPLv2 or ASL 2.0)
8efccae
URL:            http://www.openkinect.org/
8efccae
56a14f2
Source0:        https://github.com/OpenKinect/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
937f2cc
# Edit udev rule to only allow access to the device from the video group
937f2cc
Patch0:         %{name}-0.5.7-videogroup.patch
8454871
# Freenect openni driver is a plugin lib, and doesn't need soversion symlinks
8454871
Patch1:         %{name}-0.4.1-openni2.patch
7373ead
# Allow for proper libdir
7373ead
Patch3:         %{name}-0.4.2-libdir.patch
e222c04
# BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1143912
e222c04
Patch4:         secarch.patch
5ab6bce
# Fix the installation path for python libs
5ab6bce
Patch7:         %{name}-0.5.5-py3.patch
937f2cc
# Fixes to OpenCV support
937f2cc
# https://github.com/OpenKinect/libfreenect/pull/555
937f2cc
Patch8:         0001-Build-libfreenect_cv-and-cvdemo-as-C-sources.patch
937f2cc
Patch9:         0002-Fix-bugs-in-sync-library-error-handling.patch
1259981
Igor Gnatenko 062db16
BuildRequires:  gcc-c++
8efccae
BuildRequires:  cmake
8efccae
BuildRequires:  Cython
8efccae
BuildRequires:  doxygen
8efccae
BuildRequires:  freeglut-devel
8efccae
BuildRequires:  libusb1-devel
8efccae
BuildRequires:  libGL-devel
8efccae
BuildRequires:  libXi-devel
8efccae
BuildRequires:  libXmu-devel
937f2cc
BuildRequires:  opencv-devel
6933729
BuildRequires:  python3-Cython
5ab6bce
BuildRequires:  python3-devel
5ab6bce
BuildRequires:  python3-numpy
8efccae
8efccae
Requires:       udev
8efccae
8efccae
%description
8efccae
libfreenect is a free and open source library that provides access to the
8efccae
Kinect device.  Currently, the library supports the RGB webcam, the depth
8efccae
image, the LED, and the tilt motor.
8efccae
8efccae
8efccae
%package        devel
8efccae
Summary:        Development files for %{name}
8efccae
Requires:       %{name}%{?_isa} = %{version}-%{release}
8efccae
8efccae
%description    devel
8efccae
The %{name}-devel package contains libraries and header files for
8efccae
developing applications that use %{name}.
8efccae
8efccae
%package        static
8efccae
Summary:        Development files for %{name}
8efccae
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
8efccae
8efccae
%description    static
8efccae
The %{name}-static package contains static libraries for
8efccae
developing applications that use %{name}.
8efccae
8efccae
%package        fakenect
8efccae
Summary:        Library to play back recorded data for %{name}
8efccae
Requires:       %{name}%{?_isa} = %{version}-%{release}
8efccae
8efccae
%description    fakenect
8efccae
Fakenect consists of a "record" program to save dumps from the kinect sensor 
8efccae
and a library that can be linked to, providing an interface compatible with 
8efccae
freenect.  This allows you to save data and repeat for experiments, debug 
8efccae
problems, share datasets, and experiment with the kinect without having one.
8efccae
937f2cc
%package        opencv
937f2cc
Summary:        OpenCV bindings for %{name}
937f2cc
Requires:       %{name}%{?_isa} = %{version}-%{release}
8efccae
937f2cc
%description    opencv
937f2cc
The %{name}-opencv package contains the libfreenect binding
937f2cc
library for OpenCV development.
8efccae
5ab6bce
%package -n     python3-%{name}
5ab6bce
Summary:        Python 3 bindings for %{name}
5ab6bce
Requires:       %{name}%{?_isa} = %{version}-%{release}
5ab6bce
Requires:       python3-numpy
5ab6bce
%{?python_provide:%python_provide python3-%{name}}
5ab6bce
5ab6bce
%description -n  python3-%{name}
5ab6bce
The %{name}-python package contains python 3 bindings for %{name}
8efccae
8454871
%package        openni
8454871
Summary:        OpenNI2 driver for the Kinect
8454871
8454871
%description    openni
8454871
The OpenNI2-FreenectDriver is a bridge to libfreenect implemented as an 
8454871
OpenNI2 driver. It allows OpenNI2 to use Kinect hardware on Linux and OSX. 
8454871
It was originally a separate project but is now distributed with libfreenect.
8454871
8efccae
%prep
56a14f2
%setup -qn %{name}-%{commit}
8454871
rm -rf platform/windows
5ab6bce
937f2cc
%patch0 -p0 -b .videogroup
8454871
%patch1 -p0 -b .openni2
7373ead
%patch3 -p0 -b .libdir
e222c04
%patch4 -p1 -b .secarch
5ab6bce
%patch7 -p1 -b .py3
937f2cc
%patch8 -p1
937f2cc
%patch9 -p1
8efccae
8efccae
%build
8efccae
mkdir build
8efccae
pushd build
1bee53d
# FTBFS with opencv 3.4.1:
1bee53d
# https://bugzilla.redhat.com/show_bug.cgi?id=1551748
7373ead
%cmake .. \
7373ead
  -DBUILD_AUDIO=ON \
7373ead
  -DBUILD_C_SYNC=ON \
937f2cc
  -DBUILD_CV=ON \
7373ead
  -DBUILD_REDIST_PACKAGE=ON \
7373ead
  -DBUILD_EXAMPLES=ON \
7373ead
  -DBUILD_FAKENECT=ON \
6933729
  -DBUILD_PYTHON=OFF  \
6933729
  -DBUILD_PYTHON2=OFF \
6933729
  -DBUILD_PYTHON3=ON \
5ab6bce
  -DBUILD_OPENNI2_DRIVER=ON
7373ead
8efccae
make %{?_smp_mflags} VERBOSE=1
8efccae
popd
8efccae
8efccae
pushd doc
8efccae
doxygen Doxyfile
8efccae
popd
8efccae
8efccae
%install
8efccae
rm -rf %{buildroot}
8efccae
make -C build install DESTDIR=%{buildroot}
04dd1d3
04dd1d3
# Install the kinect udev rule
8efccae
mkdir -p %{buildroot}/lib/udev/rules.d
e8d69da
mkdir -p %{buildroot}%{_libdir}/openni2
8efccae
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}/lib/udev/rules.d
04dd1d3
04dd1d3
# Delete libtool archives
8efccae
find %{buildroot} -name '*.la' -exec rm -f {} ';'
8efccae
04dd1d3
# Move the fwfetcher script to the correct datadir
8efccae
mkdir -p %{buildroot}%{_datadir}/%{name}
8efccae
mv %{buildroot}%{_datadir}/fwfetcher.py   %{buildroot}%{_datadir}/%{name}
8efccae
04dd1d3
# Move openni plugin: rhbz#1094787
e8d69da
mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/Drivers
04dd1d3
8efccae
%files
5ab6bce
%license APACHE20 GPL2
5ab6bce
%doc README.md CONTRIB
8efccae
/lib/udev/rules.d/*
8efccae
%{_libdir}/libfreenect.so.*
8efccae
%{_libdir}/libfreenect_sync.so.*
8efccae
%exclude %{_bindir}/freenect-cvdemo
8efccae
%exclude %{_bindir}/fakenect
8efccae
%{_bindir}/freenect-*
8efccae
%{_datadir}/%{name}
8efccae
937f2cc
%files opencv
937f2cc
%{_bindir}/freenect-cvdemo
937f2cc
%{_libdir}/libfreenect_cv.so.*
8efccae
8efccae
%files devel
8efccae
%doc doc/html
8efccae
%doc examples/*.c wrappers/cpp/cppview.cpp
8efccae
%{_includedir}/libfreenect
8efccae
%{_libdir}/*.so
8efccae
%{_libdir}/pkgconfig/*
8efccae
%{_libdir}/fakenect/*.so
8efccae
8efccae
%files static
8efccae
%{_libdir}/*.a
8efccae
5ab6bce
%files -n python3-%{name}
5ab6bce
%{python3_sitearch}/*.so
8efccae
8efccae
%files fakenect
8efccae
%dir %{_libdir}/fakenect
8454871
%{_bindir}/fakenect-record
8efccae
%{_libdir}/fakenect/*.so.*
8efccae
%{_bindir}/fakenect
8454871
%{_mandir}/man1/fakenect*1.*
8454871
8454871
%files openni
04dd1d3
%{_libdir}/openni2
8efccae
8efccae
%changelog
cabca34
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.7-7
cabca34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cabca34
3f26cae
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.7-6
3f26cae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3f26cae
6933729
* Sun Jan 20 2019 Rich Mattes <richmattes@gmail.com> - 0.5.7-5
6933729
- Remove Python 2 support (#1634715)
6933729
122525e
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.7-4
122525e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
122525e
fc12df6
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.7-3
fc12df6
- Rebuilt for Python 3.7
fc12df6
937f2cc
* Sat May 26 2018 Rich Mattes <richmattes@gmail.com> - 0.5.7-2
937f2cc
- Re-enable OpenCV bindings (rhbz#1551748)
937f2cc
- Fix bogus obsoletes (rhbz#1537213)
937f2cc
- Update udev rule to allow device access to "video" group
937f2cc
1bee53d
* Mon Mar 05 2018 Adam Williamson <awilliam@redhat.com> - 0.5.7-1
1bee53d
- Bump to 0.5.7 (bug fixes)
1bee53d
- Disable openCV support for now (see #1551748)
cf0b818
f058c02
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-5
f058c02
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f058c02
77f59d2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-4
77f59d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
77f59d2
56b966f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-3
56b966f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
56b966f
Igor Gnatenko fe0b270
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.5.5-2
Igor Gnatenko fe0b270
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko fe0b270
5ab6bce
* Wed Mar 08 2017 Rich Mattes <richmattes@gmail.com> - 0.5.5-1
5ab6bce
- Update to release 0.5.5
5ab6bce
ada1020
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-5
ada1020
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ada1020
9b7109e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-4
9b7109e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9b7109e
5815ddc
* Sat May 14 2016 Rich Mattes <richmattes@gmail.com> - 0.5.3-3
5815ddc
- Rebuild for opencv-3.1 changes
5815ddc
ed16f5b
* Mon May 02 2016 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.5.3-2
ed16f5b
- Rebuild for opencv-3.1.0.
ed16f5b
dde914a
* Sun Feb 21 2016 Rich Mattes <richmattes@gmail.com> - 0.5.3-1
dde914a
- Update to release 0.5.3 (rhbz#1272803)
dde914a
- Fix rawhide FTBFS (rhbz#1307722)
dde914a
- Patch freenct-cppview to catch exception when no freenect device is present (rhbz#1310356)
dde914a
6b38318
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-6
6b38318
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6b38318
9378b50
* Sat Sep 26 2015 Rich Mattes <richmattes@gmail.com> - 0.5.2-5
9378b50
- Add dependency on numpy (rhbz#1265472)
9378b50
9c77ad6
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-4
9c77ad6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9c77ad6
cf718d0
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.5.2-3
cf718d0
- Rebuilt for GCC 5 C++11 ABI change
cf718d0
56a14f2
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.5.2-1
e222c04
- Add patch for s390 and ppc (rhbz#1143912)
e222c04
e222c04
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.5.2-1
56a14f2
- Update to release 0.5.2 (rhbz#1160258)
56a14f2
e8d69da
* Tue Aug 19 2014 Jiri Kastner <jkastner /at/ redhat /dot/ com> - 0.5.0-1
e8d69da
- update to release 0.5.0 (rhbz#1124171)
e8d69da
- Move openni plugin to libdir/openni2/Drivers (rhbz#1094787)
e8d69da
 
062dd31
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-3
062dd31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
062dd31
e2eaa91
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-2
e2eaa91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e2eaa91
04dd1d3
* Sun Jun 01 2014 Rich Mattes <richmattes@gmail.com> - 0.4.3-1
04dd1d3
- Update to release 0.4.3
04dd1d3
- Move openni plugin to libdir/openni2/ (rhbz#1094787)
04dd1d3
7373ead
* Mon May 05 2014 Rich Mattes <richmattes@gmail.com> - 0.4.2-1
7373ead
- Update to release 0.4.2
7373ead
- Add platform detection for aarch64
7373ead
8454871
* Fri May 02 2014 Rich Mattes <richmattes@gmail.com> - 0.4.1-1
8454871
- Update to release 0.4.1
8454871
8454871
* Fri Nov 22 2013 Rich Mattes <richmattes@gmail.com> - 0.2.0-1
8454871
- Update to release 0.2.0
8454871
8daa8ce
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-6
8daa8ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8daa8ce
20ef943
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-5
20ef943
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
20ef943
1259981
* Wed Jan 09 2013 Dan Horák <dan[at]danny.cz> - 0.1.2-4
1259981
- fixes for secondary arches
1259981
b24a346
* Sat Nov 10 2012 Rich Mattes <richmattes@gmail.com> - 0.1.2-3
b24a346
- Rebuild for new OpenCV
b24a346
8efccae
* Wed Aug 15 2012 Rich Mattes <richmattes@gmail.com> - 0.1.2-2
8efccae
- Filtered private python lib provides
8efccae
- Clarified that freenect_generate_tarball.sh works with a git tag
8efccae
8efccae
* Thu Apr 26 2012 Rich Mattes <richmattes@gmail.com> - 0.1.2-1
8efccae
- Update to git tag 0.1.2
8efccae
- Create OpenCV wrapper sub-package
8efccae
- Create fakenect library sub-package
8efccae
8454871
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.3.4a159fgit
8efccae
- Force cmake to honor rpm optflags
8efccae
- Change to out-of-tree build
8efccae
8454871
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.2.4a159fgit
8efccae
- Update to latest snapshot
8efccae
8efccae
* Mon Jan 31 2011 Rich Mattes <richmattes@gmail.com> - 0-0.1.687b2da5git
8efccae
- Initial package
8efccae