]> git.pld-linux.org Git - packages/libfreenect.git/blob - libfreenect.spec
rebuild with python 3.10
[packages/libfreenect.git] / libfreenect.spec
1 #
2 # Conditional build:
3 %bcond_without  opencv          # OpenCV wrapper
4 %bcond_without  openni2         # OpenNI2 driver
5 %bcond_without  python2         # Python 2.x extension
6 %bcond_without  python3         # Python 3.x extension
7 #
8 Summary:        Userspace driver for the Microsoft Kinect
9 Summary(pl.UTF-8):      Sterownik przestrzeni użytkownika dla kontrolera Microsoft Kinect
10 Name:           libfreenect
11 Version:        0.6.2
12 Release:        3
13 License:        Apache v2.0 or GPL v2
14 Group:          Libraries
15 #Source0Download: https://github.com/OpenKinect/libfreenect/releases
16 Source0:        https://github.com/OpenKinect/libfreenect/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  78648c6eaa74f177a63f26b303247f6e
18 Patch0:         %{name}-link.patch
19 Patch1:         %{name}-install.patch
20 URL:            https://openkinect.org/wiki/Main_Page
21 BuildRequires:  cmake >= 3.1.0
22 BuildRequires:  libstdc++-devel >= 6:4.7
23 BuildRequires:  libusb-devel >= 1.0.18
24 %{?with_opencv:BuildRequires:   opencv-devel}
25 %if %{with python2}
26 BuildRequires:  python-Cython
27 BuildRequires:  python-devel >= 1:2.7
28 BuildRequires:  python-numpy-devel
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-Cython
32 BuildRequires:  python3-devel >= 1:3.3
33 BuildRequires:  python3-numpy-devel
34 %endif
35 Requires:       libusb >= 1.0.18
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 libfreenect is a userspace driver for the Microsoft Kinect. It runs on
40 Linux, OSX, and Windows and supports:
41 - RGB and Depth Images
42 - Motors
43 - Accelerometer
44 - LED
45 - Audio
46
47 Notice: for the newer Kinect v2 (XBox One), use libfreenect 2 instead.
48
49 %description -l pl.UTF-8
50 libfreenect to sterownik przestrzeni użytkownika dla kontrolera
51 Microsoft Kinect. Działa na Linuksie, OSX oraz Windows i obsługuje:
52 - obrazy RGB z głębią
53 - silniki
54 - akcelerometr
55 - LED
56 - dźwięk
57
58 Uwaga: do nowszego Kinecta v2 (XBox One) należy używać libfreenect2.
59
60 %package fakenect
61 Summary:        Fakenect mock library
62 Summary(pl.UTF-8):      Biblioteka atrapy fakenect
63 Group:          Libraries
64 Requires:       %{name} = %{version}-%{release}
65
66 %description fakenect
67 Fakenect mock library.
68
69 %description fakenect -l pl.UTF-8
70 Biblioteka atrapy fakenect.
71
72 %package opencv
73 Summary:        OpenCV wrapper for libfreenect
74 Summary(pl.UTF-8):      Obudowanie OpenCV do biblioteki libfreenect
75 Group:          Libraries
76 Requires:       %{name} = %{version}-%{release}
77
78 %description opencv
79 OpenCV wrapper for libfreenect.
80
81 %description opencv -l pl.UTF-8
82 Obudowanie OpenCV do biblioteki libfreenect.
83
84 %package -n OpenNI2-driver-freenect
85 Summary:        OpenNI2 driver for Microsoft Kinect
86 Summary(pl.UTF-8):      Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2
87 Group:          Libraries
88 Requires:       %{name} = %{version}-%{release}
89 Requires:       OpenNI2
90
91 %description -n OpenNI2-driver-freenect
92 OpenNI2 driver for Microsoft Kinect.
93
94 %description -n OpenNI2-driver-freenect -l pl.UTF-8
95 Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2.
96
97 %package devel
98 Summary:        Header files for libfreenect libraries
99 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek libfreenect
100 Group:          Development/Libraries
101 Requires:       %{name} = %{version}-%{release}
102 Requires:       libusb-devel >= 1.0.18
103
104 %description devel
105 Header files for libfreenect libraries.
106
107 %description devel -l pl.UTF-8
108 Pliki nagłówkowe bibliotek libfreenect.
109
110 %package static
111 Summary:        Static libfreenect libraries
112 Summary(pl.UTF-8):      Statyczne biblioteki libfreenect
113 Group:          Development/Libraries
114 Requires:       %{name}-devel = %{version}-%{release}
115
116 %description static
117 Static libfreenect libraries.
118
119 %description static -l pl.UTF-8
120 Statyczne biblioteki libfreenect.
121
122 %package -n python-freenect
123 Summary:        Python 2 interface to libfreenect
124 Summary(pl.UTF-8):      Interfejs Pythona 2 do libfreenect
125 Group:          Libraries/Python
126 Requires:       %{name} = %{version}-%{release}
127 Requires:       python-libs
128
129 %description -n python-freenect
130 Python 2 interface to libfreenect.
131
132 %description -n python-freenect -l pl.UTF-8
133 Interfejs Pythona 2 do libfreenect.
134
135 %package -n python3-freenect
136 Summary:        Python 3 interface to libfreenect
137 Summary(pl.UTF-8):      Interfejs Pythona 3 do libfreenect
138 Group:          Libraries/Python
139 Requires:       %{name} = %{version}-%{release}
140 Requires:       python3-libs
141
142 %description -n python3-freenect
143 Python 3 interface to libfreenect.
144
145 %description -n python3-freenect -l pl.UTF-8
146 Interfejs Pythona 3 do libfreenect.
147
148 %prep
149 %setup -q
150 %patch0 -p1
151 %patch1 -p1
152
153 %{__sed} -i -e '1s,/usr/bin/env python2,%{__python},' src/fwfetcher.py
154
155 %build
156 install -d build
157 cd build
158 %cmake .. \
159         %{?with_opencv:-DBUILD_CV=ON} \
160         -DBUILD_EXAMPLES=OFF \
161         %{?with_python2:-DBUILD_PYTHON2=ON} \
162         %{?with_python3:-DBUILD_PYTHON3=ON} \
163         %{?with_openni2:-DBUILD_OPENNI2_DRIVER=ON}
164
165 %{__make}
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169
170 %{__make} -C build install \
171         DESTDIR=$RPM_BUILD_ROOT
172
173 %{__mv} $RPM_BUILD_ROOT%{_datadir}/fwfetcher.py \
174         $RPM_BUILD_ROOT%{_datadir}/libfreenect
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post   -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
181
182 %post   opencv -p /sbin/ldconfig
183 %postun opencv -p /sbin/ldconfig
184
185 %files
186 %defattr(644,root,root,755)
187 %doc README.md
188 %attr(755,root,root) %{_libdir}/libfreenect.so.*.*.*
189 %attr(755,root,root) %ghost %{_libdir}/libfreenect.so.0
190 %attr(755,root,root) %{_libdir}/libfreenect_sync.so.*.*.*
191 %attr(755,root,root) %ghost %{_libdir}/libfreenect_sync.so.0
192 %dir %{_datadir}/libfreenect
193 %{_datadir}/libfreenect/fwfetcher.py
194
195 %files fakenect
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/fakenect
198 %attr(755,root,root) %{_bindir}/fakenect-record
199 %dir %{_libdir}/fakenect
200 %attr(755,root,root) %{_libdir}/fakenect/libfakenect.so*
201 %{_mandir}/man1/fakenect.1*
202 %{_mandir}/man1/fakenect-record.1*
203
204 %if %{with opencv}
205 %files opencv
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_bindir}/freenect-cvdemo
208 %attr(755,root,root) %{_libdir}/libfreenect_cv.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libfreenect_cv.so.0
210 %attr(755,root,root) %{_libdir}/libfreenect_cv.so
211 %endif
212
213 %if %{with openni2}
214 %files -n OpenNI2-driver-freenect
215 %defattr(644,root,root,755)
216 %dir %{_libdir}/OpenNI2-FreenectDriver
217 %attr(755,root,root) %{_libdir}/OpenNI2-FreenectDriver/libFreenectDriver.so*
218 %endif
219
220 %files devel
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libfreenect.so
223 %attr(755,root,root) %{_libdir}/libfreenect_sync.so
224 %{_includedir}/libfreenect
225 %{_pkgconfigdir}/libfreenect.pc
226 %{_datadir}/libfreenect/libfreenectConfig.cmake
227
228 %files static
229 %defattr(644,root,root,755)
230 %{_libdir}/libfreenect.a
231 %{_libdir}/libfreenect_sync.a
232
233 %if %{with python2}
234 %files -n python-freenect
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{py_sitedir}/freenect.so
237 %endif
238
239 %if %{with python3}
240 %files -n python3-freenect
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{py3_sitedir}/freenect.so
243 %endif
This page took 0.118022 seconds and 3 git commands to generate.