File libfreenect.spec of Package libfreenect
#
# spec file for package libfreenect
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libfreenect
Version: 0.6.2
Release: 0
Summary: Drivers and libraries for the Xbox Kinect device
License: Apache-2.0 and GPL-2.0
Group: Development/Libraries/C and C++
Url: https://github.com/OpenKinect/libfreenect
Source: https://github.com/OpenKinect/libfreenect/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: %{name}-python-paths.patch
Patch1: %{name}-libdir.patch
BuildRequires: Mesa-devel
BuildRequires: cmake
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libusb-1_0-devel
BuildRequires: opencv-devel
BuildRequires: python3-Cython
BuildRequires: python3-devel
BuildRequires: python3-numpy-devel
BuildRequires: xorg-x11-devel
BuildRequires: python-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Drivers and libraries for the Xbox Kinect device.
libfreenect is the core library for accessing the Microsoft Kinect USB camera.
%package utils
Summary: Utilities for libfreenect
Group: Development/Libraries/C and C++
%description utils
Utilities for libfreenect.
libfreenect is the core library for accessing the Microsoft Kinect USB camera.
%package devel
Summary: Development files for libfreenect
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
Development files for libfreenect.
libfreenect is the core library for accessing the Microsoft Kinect USB camera.
%package -n python-freenect
Summary: Python bindings for libfreenect
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description -n python-freenect
Python bindings for libfreenect.
libfreenect is the core library for accessing the Microsoft Kinect USB camera.
%prep
%setup -q
%patch0
%patch1
%build
%cmake -DBUILD_CV=1 -DBUILD_PYTHON3=ON \
-DPYTHON_SITE_PACKAGES=%{python_sitelib} \
-Wall
make %{?_smp_mflags}
%install
install -D -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}%{_prefix}/lib/udev/rules.d/51-kinect.rules
cd build
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/libfreenect*.a
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_prefix}/lib/udev/rules.d/51-kinect.rules
%{_libdir}/libfreenect*.so.*
%files utils
%defattr(-,root,root)
%{_mandir}/man1/fakenect.1*
%{_mandir}/man1/fakenect-record.1*
%{_bindir}/fakenect*
%{_bindir}/freenect*
%{_libdir}/fakenect
%{_datadir}/fwfetcher.py
%files devel
%defattr(-,root,root)
%{_includedir}/libfreenect/
%{_libdir}/libfreenect*.so
%{_libdir}/pkgconfig/libfreenect.pc
%dir %{_datadir}/libfreenect
%{_datadir}/libfreenect/libfreenectConfig.cmake
%files -n python-freenect
%defattr(-,root,root)
%{python3_sitelib}/freenect.so
%changelog