1 # TODO: CUDA (on bcond)
4 %bcond_without openni2 # OpenNI2 driver
6 Summary: Driver for Kinect for Windows v2 (K4W2) devices
7 Summary(pl.UTF-8): Sterownik dla urządzeń Kinect for Windows v2 (K4W2)
11 License: Apache v2.0 or GPL v2
13 #Source0Download: https://github.com/OpenKinect/libfreenect2/releases
14 Source0: https://github.com/OpenKinect/libfreenect2/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 54bde616ede3cff23eaeb2a736ca6e45
16 Patch0: %{name}-c++.patch
17 Patch1: %{name}-link.patch
18 Patch2: %{name}-libsuffix.patch
19 URL: https://openkinect.org/wiki/Main_Page
20 BuildRequires: OpenCL-devel >= 1.1
21 BuildRequires: OpenGL-devel >= 3.1
22 %{?with_openni2:BuildRequires: OpenNI2-devel >= 2.2.0.33}
23 BuildRequires: cmake >= 2.8.12.1
24 BuildRequires: glfw-devel >= 3
25 BuildRequires: libjpeg-turbo-devel
26 BuildRequires: libstdc++-devel >= 6:4.7
27 BuildRequires: libusb-devel >= 1.0.20
28 BuildRequires: libva-devel
29 BuildRequires: libva-drm-devel
30 BuildRequires: pkgconfig
31 Requires: libusb >= 1.0.20
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Driver for Kinect for Windows v2 (K4W2) devices.
37 %description -l pl.UTF-8
38 Sterownik dla urządzeń Kinect for Windows v2 (K4W2).
41 Summary: Header files for libfreenect libraries
42 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libfreenect
43 Group: Development/Libraries
44 Requires: %{name} = %{version}-%{release}
45 Requires: libusb-devel >= 1.0.20
48 Header files for libfreenect libraries.
50 %description devel -l pl.UTF-8
51 Pliki nagłówkowe bibliotek libfreenect.
53 %package -n OpenNI2-driver-freenect2
54 Summary: OpenNI2 driver for Microsoft Kinect
55 Summary(pl.UTF-8): Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2
57 Requires: %{name} = %{version}-%{release}
58 Requires: OpenNI2 >= 2.2.0.33
60 %description -n OpenNI2-driver-freenect2
61 OpenNI2 driver for Microsoft Kinect.
63 %description -n OpenNI2-driver-freenect2 -l pl.UTF-8
64 Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2.
76 -DBUILD_EXAMPLES=OFF \
77 %{!?with_openni2:-DBUILD_OPENNI2_DRIVER=OFF} \
80 -DLIBFREENECT2_THREADING_LIBRARIES=pthread
85 rm -rf $RPM_BUILD_ROOT
87 %{__make} -C build install \
88 DESTDIR=$RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
93 %post -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
97 %defattr(644,root,root,755)
98 %doc CONTRIB README.md
99 %attr(755,root,root) %{_libdir}/libfreenect2.so.*.*.*
100 %attr(755,root,root) %ghost %{_libdir}/libfreenect2.so.0.2
103 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_libdir}/libfreenect2.so
105 %{_includedir}/libfreenect2
106 %{_pkgconfigdir}/freenect2.pc
107 %{_libdir}/cmake/freenect2
110 %files -n OpenNI2-driver-freenect2
111 %defattr(644,root,root,755)
112 %attr(755,root,root) %{_libdir}/OpenNI2/Drivers/libfreenect2-openni2.so*