]> git.pld-linux.org Git - SPECS.git/blob - libfreenect2.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / libfreenect2.spec
1 # TODO: CUDA (on bcond)
2 #
3 # Conditional build:
4 %bcond_without  openni2         # OpenNI2 driver
5 #
6 Summary:        Driver for Kinect for Windows v2 (K4W2) devices
7 Summary(pl.UTF-8):      Sterownik dla urządzeń Kinect for Windows v2 (K4W2)
8 Name:           libfreenect2
9 Version:        0.2.0
10 Release:        1
11 License:        Apache v2.0 or GPL v2
12 Group:          Libraries
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)
33
34 %description
35 Driver for Kinect for Windows v2 (K4W2) devices.
36
37 %description -l pl.UTF-8
38 Sterownik dla urządzeń Kinect for Windows v2 (K4W2).
39
40 %package devel
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
46
47 %description devel
48 Header files for libfreenect libraries.
49
50 %description devel -l pl.UTF-8
51 Pliki nagłówkowe bibliotek libfreenect.
52
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
56 Group:          Libraries
57 Requires:       %{name} = %{version}-%{release}
58 Requires:       OpenNI2 >= 2.2.0.33
59
60 %description -n OpenNI2-driver-freenect2
61 OpenNI2 driver for Microsoft Kinect.
62
63 %description -n OpenNI2-driver-freenect2 -l pl.UTF-8
64 Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2.
65
66 %prep
67 %setup -q
68 %patch0 -p1
69 %patch1 -p1
70 %patch2 -p1
71
72 %build
73 install -d build
74 cd build
75 %cmake .. \
76         -DBUILD_EXAMPLES=OFF \
77         %{!?with_openni2:-DBUILD_OPENNI2_DRIVER=OFF} \
78         -DENABLE_CUDA=OFF \
79         -DENABLE_CXX11=ON \
80         -DLIBFREENECT2_THREADING_LIBRARIES=pthread
81
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %{__make} -C build install \
88         DESTDIR=$RPM_BUILD_ROOT
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post   -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
95
96 %files
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
101
102 %files devel
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
108
109 %if %{with openni2}
110 %files -n OpenNI2-driver-freenect2
111 %defattr(644,root,root,755)
112 %attr(755,root,root) %{_libdir}/OpenNI2/Drivers/libfreenect2-openni2.so*
113 %endif
This page took 0.287549 seconds and 3 git commands to generate.