]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - contrib subpackage(s) | |
3 | # - contrib BRs: | |
4 | # opencv_contrib-3.1.0/modules/cnn_3dobj/CMakeLists.txt:find_package(Caffe) | |
5 | # opencv_contrib-3.1.0/modules/cnn_3dobj/CMakeLists.txt:find_package(Protobuf) | |
6 | # opencv_contrib-3.1.0/modules/cnn_3dobj/CMakeLists.txt:find_package(Glog) | |
7 | # opencv_contrib-3.1.0/modules/hdf/CMakeLists.txt:find_package(HDF5) | |
8 | # opencv_contrib-3.1.0/modules/sfm/CMakeLists.txt:find_package(Ceres QUIET) | |
9 | # opencv_contrib-3.1.0/modules/text/CMakeLists.txt:find_package(Tesseract) | |
10 | # | |
11 | # - Smartek GigEVisionSDK (http://www.smartekvision.com/ but I can't see SDK with Linux library?) | |
12 | # - CUDA, CUFFT, CUBLAS, NVCUVID support (on bcond) | |
13 | # - ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary) | |
14 | # | |
15 | # Conditional build: | |
16 | # - general options: | |
17 | %bcond_with tbb # Threading Building Blocks support (everywhere) | |
18 | %bcond_with sse # use SSE instructions | |
19 | %bcond_with sse2 # use SSE2 instructions | |
20 | %bcond_with sse3 # use SSE3 instructions | |
21 | %bcond_with ssse3 # use SSSE3 instructions | |
22 | %bcond_with sse41 # use SSE4.1 instructions | |
23 | %bcond_with sse42 # use SSE4.2 instructions | |
24 | %bcond_with avx # use AVX instructions | |
25 | %bcond_without opencl # OpenCL support | |
26 | %bcond_with opencl_amdblas # AMD OpenCL BLAS routines | |
27 | %bcond_with opencl_amdfft # AMD OpenCL FFT routines | |
28 | %bcond_without opengl # OpenGL support | |
29 | %bcond_without openmp # OpenMP support (available when not using tbb) | |
30 | %bcond_without examples # Install examples | |
31 | # - bindings | |
32 | %bcond_without java # Java binding | |
33 | # - highgui options: | |
34 | %bcond_without ffmpeg # FFMpeg support in highgui | |
35 | %bcond_without gstreamer # GStreamer support in highgui | |
36 | %bcond_with openni # OpenNI (Natural Interaction) support in highgui | |
37 | %bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary) | |
38 | %bcond_with qt # Qt backend instead of GTK+ in highgui | |
39 | %bcond_with unicap # Unicap support in highgui (GPL) | |
40 | %bcond_without v4l # Video4Linux in highgui | |
41 | %bcond_with ximea # m3API (XIMEA cameras) support in highgui (proprietary) | |
42 | %bcond_with xine # XINE support in highgui (GPL) | |
43 | # - other modules | |
44 | %bcond_without vtk # VTK library support (opencv_viz module) | |
45 | ||
46 | %ifarch pentium3 pentium4 %{x8664} x32 | |
47 | %define with_sse 1 | |
48 | %endif | |
49 | %ifarch pentium4 %{x8664} x32 | |
50 | %define with_sse2 1 | |
51 | %endif | |
52 | Summary: A library of programming functions mainly aimed at real time computer vision | |
53 | Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym | |
54 | Name: opencv | |
55 | Version: 3.1.0 | |
56 | Release: 8 | |
57 | Epoch: 1 | |
58 | %if %{with unicap} || %{with xine} | |
59 | License: GPL (enforced by used libraries), BSD (opencv itself) | |
60 | %else | |
61 | License: BSD | |
62 | %endif | |
63 | Group: Libraries | |
64 | Source0: https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.tar.gz | |
65 | # Source0-md5: 70e1dd07f0aa06606f1bc0e3fa15abd3 | |
66 | Source1: https://github.com/Itseez/opencv_contrib/archive/%{version}/%{name}_contrib-%{version}.tar.gz | |
67 | # Source1-md5: a822839ad3ab79ff837c16785ea9dd10 | |
68 | Patch0: %{name}-cflags.patch | |
69 | Patch1: %{name}-ximea.patch | |
70 | Patch2: java-ant-sourcelevel.patch | |
71 | Patch3: cmake-install-path.patch | |
72 | Patch4: vtk7.patch | |
73 | Patch5: no-redefinition.patch | |
74 | URL: http://www.opencv.org/ | |
75 | %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel} | |
76 | %{?with_opencl:BuildRequires: OpenCL-devel} | |
77 | BuildRequires: OpenEXR-devel | |
78 | %{?with_opengl:BuildRequires: OpenGL-GLU-devel} | |
79 | %{?with_opengl:BuildRequires: OpenGL-devel} | |
80 | # as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, but the result is not used | |
81 | %{?with_openni:BuildRequires: OpenNI-devel} | |
82 | %{?with_ximea:BuildRequires: XIMEA-devel >= 4} | |
83 | %{?with_java:BuildRequires: ant} | |
84 | %{?with_opencl_amdblas:BuildRequires: clAmdBlas-devel} | |
85 | %{?with_opencl_amdfft:BuildRequires: clAmdFft-devel} | |
86 | BuildRequires: cmake >= 2.8 | |
87 | BuildRequires: doxygen | |
88 | BuildRequires: eigen3 >= 3 | |
89 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.7} | |
90 | %{?with_openmp:BuildRequires: gcc-c++ >= 6:4.2} | |
91 | BuildRequires: gflags-devel | |
92 | BuildRequires: gl2ps-devel | |
93 | BuildRequires: glog-devel | |
94 | %if %{with gstreamer} | |
95 | BuildRequires: gstreamer-devel >= 1.0 | |
96 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
97 | %endif | |
98 | BuildRequires: jasper-devel | |
99 | %{?with_java:BuildRequires: jdk} | |
100 | BuildRequires: libdc1394-devel >= 2 | |
101 | %{?with_openmp:BuildRequires: libgomp-devel} | |
102 | BuildRequires: libjpeg-devel | |
103 | BuildRequires: libpng-devel | |
104 | BuildRequires: libraw1394-devel | |
105 | BuildRequires: libstdc++-devel | |
106 | BuildRequires: libtiff-devel | |
107 | BuildRequires: libtool | |
108 | %if %{with unicap} | |
109 | BuildRequires: libucil-devel | |
110 | BuildRequires: libunicap-devel | |
111 | %endif | |
112 | BuildRequires: libv4l-devel | |
113 | BuildRequires: pkgconfig | |
114 | BuildRequires: python >= 2.0 | |
115 | BuildRequires: python-devel >= 2.0 | |
116 | BuildRequires: python-numpy-devel | |
117 | BuildRequires: python3 >= 1:3.2 | |
118 | BuildRequires: python3-devel >= 1:3.2 | |
119 | BuildRequires: python3-numpy-devel | |
120 | BuildRequires: rpm-pythonprov | |
121 | BuildRequires: rpmbuild(macros) >= 1.606 | |
122 | BuildRequires: sed >= 4.0 | |
123 | BuildRequires: sphinx-pdg | |
124 | BuildRequires: swig-python | |
125 | %{?with_tbb:BuildRequires: tbb-devel} | |
126 | %if %{with vtk} | |
127 | BuildRequires: vtk-devel >= 5.8.0 | |
128 | BuildRequires: vtk-java >= 5.8.0 | |
129 | BuildRequires: vtk-tcl >= 5.8.0 | |
130 | %endif | |
131 | %{?with_xine:BuildRequires: xine-lib-devel} | |
132 | BuildRequires: xorg-lib-libX11-devel | |
133 | BuildRequires: zlib-devel | |
134 | %if %{with qt} | |
135 | BuildRequires: QtCore-devel >= 4 | |
136 | BuildRequires: QtGui-devel >= 4 | |
137 | %{?with_opengl:BuildRequires: QtOpenGL-devel >= 4} | |
138 | BuildRequires: qt4-qmake >= 4 | |
139 | %else | |
140 | BuildRequires: gtk+2-devel >= 2.0 | |
141 | %{?with_opengl:BuildRequires: gtkglext-devel >= 1.0} | |
142 | %endif | |
143 | Requires: %{name}-core = %{epoch}:%{version}-%{release} | |
144 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
145 | ||
146 | %define jver %(echo %{version} | cut -d. -f1-3 | tr -d .) | |
147 | %define sover %(echo %{version} | cut -d. -f1-2) | |
148 | ||
149 | %description | |
150 | OpenCV (Open Source Computer Vision) is a library of programming | |
151 | functions mainly aimed at real time computer vision. | |
152 | ||
153 | Example applications of the OpenCV library are: | |
154 | - Human-Computer Interaction (HCI) | |
155 | - Object Identification, Segmentation and Recognition | |
156 | - Face Recognition | |
157 | - Gesture Recognition | |
158 | - Motion Tracking | |
159 | - Ego Motion, Motion Understanding | |
160 | - Structure From Motion (SFM) | |
161 | - Stereo and Multi-Camera Calibration and Depth Computation | |
162 | - Mobile Robotics. | |
163 | ||
164 | %description -l pl.UTF-8 | |
165 | OpenCV (Open Source Computer Vision) to biblioteka funkcji | |
166 | przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym. | |
167 | ||
168 | Przykładowe zastosowania biblioteki OpenCV to | |
169 | - interakcje człowiek-komputer (HCI) | |
170 | - identyfikacja, segmentacja i rozpoznawanie obiektów | |
171 | - rozpoznawanie twarzy | |
172 | - rozpoznawanie gestów | |
173 | - śledzenie ruchu | |
174 | - rozumienie ruchu | |
175 | - SFM (Structure From Motion) | |
176 | - kalibracja dwu- i wielokamerowa, obliczanie głębi | |
177 | - robotyka ruchu. | |
178 | ||
179 | %package core | |
180 | Summary: OpenCV core libraries | |
181 | Summary(pl.UTF-8): Podstawowe biblioteki OpenCV | |
182 | Group: Libraries | |
183 | Conflicts: opencv < 2.4.6.2-1 | |
184 | ||
185 | %description core | |
186 | This package contains the OpenCV C/C++ core libraries. | |
187 | ||
188 | %description core -l pl.UTF-8 | |
189 | Ten pakiet zawiera podstawowe biblioteki C/C++ OpenCV. | |
190 | ||
191 | %package viz | |
192 | Summary: OpenCV viz library (VTK support) | |
193 | Summary(pl.UTF-8): Biblioteka OpenCV viz (obsługa VTK) | |
194 | Group: Libraries | |
195 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
196 | ||
197 | %description viz | |
198 | OpenCV viz library (VTK support). | |
199 | ||
200 | %description viz -l pl.UTF-8 | |
201 | Biblioteka OpenCV viz (obsługa VTK). | |
202 | ||
203 | %package devel | |
204 | Summary: Header files for OpenCV library | |
205 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV | |
206 | Group: Development/Libraries | |
207 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
208 | %if %{with vtk} | |
209 | Requires: %{name}-viz = %{epoch}:%{version}-%{release} | |
210 | %endif | |
211 | Obsoletes: opencv-static | |
212 | ||
213 | %description devel | |
214 | Header files for OpenCV library. | |
215 | ||
216 | %description devel -l pl.UTF-8 | |
217 | Pliki nagłówkowe biblioteki OpenCV. | |
218 | ||
219 | %package doc | |
220 | Summary: Manual for OpenCV | |
221 | Summary(fr.UTF-8): Documentation pour OpenCV | |
222 | Summary(it.UTF-8): Documentazione di OpenCV | |
223 | Summary(pl.UTF-8): Podręcznik dla OpenCV | |
224 | Group: Documentation | |
225 | # noarch subpackages only when building with rpm5 | |
226 | %if "%{_rpmversion}" >= "5" | |
227 | BuildArch: noarch | |
228 | %endif | |
229 | ||
230 | %description doc | |
231 | Documentation for OpenCV. | |
232 | ||
233 | %description doc -l fr.UTF-8 | |
234 | Documentation pour OpenCV. | |
235 | ||
236 | %description doc -l it.UTF-8 | |
237 | Documentazione di OpenCV. | |
238 | ||
239 | %description doc -l pl.UTF-8 | |
240 | Dokumentacja do OpenCV. | |
241 | ||
242 | %package examples | |
243 | Summary: OpenCV code examples | |
244 | Group: Documentation | |
245 | %if "%{_rpmversion}" >= "5" | |
246 | BuildArch: noarch | |
247 | %endif | |
248 | ||
249 | %description examples | |
250 | OpenCV code examples. | |
251 | ||
252 | %package -n java-opencv | |
253 | Summary: OpenCV Java bindings | |
254 | Summary(pl.UTF-8): Wiązania Javy do OpenCV | |
255 | Group: Libraries/Java | |
256 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
257 | Requires: jre | |
258 | ||
259 | %description -n java-opencv | |
260 | OpenCV Java bindings. | |
261 | ||
262 | %description -n java-opencv -l pl.UTF-8 | |
263 | Wiązania Javy do OpenCV. | |
264 | ||
265 | %package -n python-opencv | |
266 | Summary: OpenCV Python 2 bindings | |
267 | Summary(pl.UTF-8): Wiązania Pythona 2 do OpenCV | |
268 | Group: Libraries/Python | |
269 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
270 | Requires: python-libs | |
271 | ||
272 | %description -n python-opencv | |
273 | OpenCV Python 2 bindings. | |
274 | ||
275 | %description -n python-opencv -l pl.UTF-8 | |
276 | Wiązania Pythona 2 do OpenCV. | |
277 | ||
278 | %package -n python3-opencv | |
279 | Summary: OpenCV Python 3 bindings | |
280 | Summary(pl.UTF-8): Wiązania Pythona 3 do OpenCV | |
281 | Group: Libraries/Python | |
282 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
283 | Requires: python3-libs | |
284 | ||
285 | %description -n python3-opencv | |
286 | OpenCV Python 3 bindings. | |
287 | ||
288 | %description -n python3-opencv -l pl.UTF-8 | |
289 | Wiązania Pythona 3 do OpenCV. | |
290 | ||
291 | %prep | |
292 | %setup -q -a1 | |
293 | ||
294 | %undos CMakeLists.txt | |
295 | ||
296 | %patch0 -p1 | |
297 | %patch1 -p1 | |
298 | %patch2 -p1 | |
299 | %patch3 -p1 | |
300 | %patch4 -p1 | |
301 | %patch5 -p1 | |
302 | ||
303 | %build | |
304 | install -d build | |
305 | cd build | |
306 | ||
307 | # handle cmake & ccache | |
308 | # http://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmakec | |
309 | if [[ "%{__cc}" = *ccache* ]]; then | |
310 | cc="%{__cc}" | |
311 | cxx="%{__cxx}" | |
312 | ccache=" | |
313 | -DCMAKE_C_COMPILER="ccache" -DCMAKE_C_COMPILER_ARG1="${cc#ccache }" \ | |
314 | -DCMAKE_CXX_COMPILER="ccache" -DCMAKE_CXX_COMPILER_ARG1="${cxx#ccache }" \ | |
315 | " | |
316 | fi | |
317 | ||
318 | %cmake .. \ | |
319 | $ccache \ | |
320 | -DENABLE_PRECOMPILED_HEADERS=OFF \ | |
321 | -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \ | |
322 | -DENABLE_AVX=%{?with_avx:ON}%{!?with_avx:OFF} \ | |
323 | -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \ | |
324 | -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \ | |
325 | -DENABLE_SSE3=%{?with_sse3:ON}%{!?with_sse3:OFF} \ | |
326 | -DENABLE_SSSE3=%{?with_ssse3:ON}%{!?with_ssse3:OFF} \ | |
327 | -DENABLE_SSE41=%{?with_sse41:ON}%{!?with_sse41:OFF} \ | |
328 | -DENABLE_SSE42=%{?with_sse42:ON}%{!?with_sse42:OFF} \ | |
329 | -DBUILD_NEW_PYTHON_SUPPORT=ON \ | |
330 | %if %{with examples} | |
331 | -DINSTALL_C_EXAMPLES=ON \ | |
332 | -DINSTALL_PYTHON_EXAMPLES=ON \ | |
333 | %endif | |
334 | %{?with_ffmpeg:-DWITH_FFMPEG=ON} \ | |
335 | %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \ | |
336 | %{?with_opencl:-DWITH_OPENCL=ON} \ | |
337 | %{!?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=OFF} \ | |
338 | %{!?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=OFF} \ | |
339 | %{?with_opengl:-DWITH_OPENGL=ON} \ | |
340 | %{?with_openmp:-DWITH_OPENMP=ON} \ | |
341 | %{?with_openni:-DWITH_OPENNI=ON} \ | |
342 | %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \ | |
343 | %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \ | |
344 | %{?with_tbb:-DWITH_TBB=ON} \ | |
345 | %{?with_unicap:-DWITH_UNICAP=ON} \ | |
346 | %{!?with_v4l:-DWITH_V4L=OFF} \ | |
347 | %{?with_vtk:-DWITH_VTK=ON} \ | |
348 | %{?with_ximea:-DWITH_XIMEA=ON} \ | |
349 | %{?with_xine:-DWITH_XINE=ON} \ | |
350 | -DWITH_IPP=OFF | |
351 | ||
352 | %{__make} | |
353 | ||
354 | %install | |
355 | rm -rf $RPM_BUILD_ROOT | |
356 | %{__make} -C build install \ | |
357 | DESTDIR=$RPM_BUILD_ROOT | |
358 | ||
359 | %if %{with examples} | |
360 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
361 | mv $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
362 | %endif | |
363 | ||
364 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} | |
365 | cp -p build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
366 | ||
367 | # disable completeness check incompatible with split packaging | |
368 | %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d' $RPM_BUILD_ROOT%{_datadir}/OpenCV/OpenCVModules.cmake | |
369 | ||
370 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
371 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
372 | %py_postclean | |
373 | ||
374 | %if %{with java} | |
375 | # move to proper directories, create symlink | |
376 | install -d $RPM_BUILD_ROOT%{_javadir} | |
377 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/OpenCV/java/libopencv_java*.so $RPM_BUILD_ROOT%{_libdir} | |
378 | sed -i -e 's#/share/OpenCV/java/libopencv_java%{jver}\.so#/%{_lib}/libopencv_java%{jver}.so#g' \ | |
379 | $RPM_BUILD_ROOT%{_datadir}/OpenCV/OpenCVModules-pld.cmake | |
380 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/OpenCV/java/opencv-*.jar $RPM_BUILD_ROOT%{_javadir} | |
381 | rmdir $RPM_BUILD_ROOT%{_datadir}/OpenCV/java | |
382 | ln -sf $(basename $RPM_BUILD_ROOT%{_javadir}/opencv-*.jar) $RPM_BUILD_ROOT%{_javadir}/opencv.jar | |
383 | %endif | |
384 | ||
385 | %clean | |
386 | rm -rf $RPM_BUILD_ROOT | |
387 | ||
388 | %post -p /sbin/ldconfig | |
389 | %postun -p /sbin/ldconfig | |
390 | ||
391 | %post core -p /sbin/ldconfig | |
392 | %postun core -p /sbin/ldconfig | |
393 | ||
394 | %post viz -p /sbin/ldconfig | |
395 | %postun viz -p /sbin/ldconfig | |
396 | ||
397 | %post -n java-opencv -p /sbin/ldconfig | |
398 | %postun -n java-opencv -p /sbin/ldconfig | |
399 | ||
400 | %files | |
401 | %defattr(644,root,root,755) | |
402 | %attr(755,root,root) %{_bindir}/opencv_annotation | |
403 | %attr(755,root,root) %{_bindir}/opencv_createsamples | |
404 | %attr(755,root,root) %{_bindir}/opencv_traincascade | |
405 | %attr(755,root,root) %{_libdir}/libopencv_calib3d.so.*.*.* | |
406 | %attr(755,root,root) %ghost %{_libdir}/libopencv_calib3d.so.%{sover} | |
407 | %attr(755,root,root) %{_libdir}/libopencv_features2d.so.*.*.* | |
408 | %attr(755,root,root) %ghost %{_libdir}/libopencv_features2d.so.%{sover} | |
409 | %attr(755,root,root) %{_libdir}/libopencv_highgui.so.*.*.* | |
410 | %attr(755,root,root) %ghost %{_libdir}/libopencv_highgui.so.%{sover} | |
411 | %attr(755,root,root) %{_libdir}/libopencv_objdetect.so.*.*.* | |
412 | %attr(755,root,root) %ghost %{_libdir}/libopencv_objdetect.so.%{sover} | |
413 | %attr(755,root,root) %{_libdir}/libopencv_stitching.so.*.*.* | |
414 | %attr(755,root,root) %ghost %{_libdir}/libopencv_stitching.so.%{sover} | |
415 | %attr(755,root,root) %{_libdir}/libopencv_superres.so.*.*.* | |
416 | %attr(755,root,root) %ghost %{_libdir}/libopencv_superres.so.%{sover} | |
417 | %attr(755,root,root) %{_libdir}/libopencv_videostab.so.*.*.* | |
418 | %attr(755,root,root) %ghost %{_libdir}/libopencv_videostab.so.%{sover} | |
419 | # contrib modules | |
420 | %attr(755,root,root) %{_bindir}/opencv_waldboost_detector | |
421 | %attr(755,root,root) %ghost %{_libdir}/libopencv_aruco.so.%{sover} | |
422 | %attr(755,root,root) %{_libdir}/libopencv_aruco.so.*.*.* | |
423 | %attr(755,root,root) %ghost %{_libdir}/libopencv_bgsegm.so.%{sover} | |
424 | %attr(755,root,root) %{_libdir}/libopencv_bgsegm.so.*.*.* | |
425 | %attr(755,root,root) %ghost %{_libdir}/libopencv_bioinspired.so.%{sover} | |
426 | %attr(755,root,root) %{_libdir}/libopencv_bioinspired.so.*.*.* | |
427 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ccalib.so.%{sover} | |
428 | %attr(755,root,root) %{_libdir}/libopencv_ccalib.so.*.*.* | |
429 | %attr(755,root,root) %ghost %{_libdir}/libopencv_datasets.so.%{sover} | |
430 | %attr(755,root,root) %{_libdir}/libopencv_datasets.so.*.*.* | |
431 | %attr(755,root,root) %ghost %{_libdir}/libopencv_dnn.so.%{sover} | |
432 | %attr(755,root,root) %{_libdir}/libopencv_dnn.so.*.*.* | |
433 | %attr(755,root,root) %ghost %{_libdir}/libopencv_dpm.so.%{sover} | |
434 | %attr(755,root,root) %{_libdir}/libopencv_dpm.so.*.*.* | |
435 | %attr(755,root,root) %ghost %{_libdir}/libopencv_face.so.%{sover} | |
436 | %attr(755,root,root) %{_libdir}/libopencv_face.so.*.*.* | |
437 | %attr(755,root,root) %ghost %{_libdir}/libopencv_fuzzy.so.%{sover} | |
438 | %attr(755,root,root) %{_libdir}/libopencv_fuzzy.so.*.*.* | |
439 | %attr(755,root,root) %ghost %{_libdir}/libopencv_hdf.so.%{sover} | |
440 | %attr(755,root,root) %{_libdir}/libopencv_hdf.so.*.*.* | |
441 | %attr(755,root,root) %ghost %{_libdir}/libopencv_line_descriptor.so.%{sover} | |
442 | %attr(755,root,root) %{_libdir}/libopencv_line_descriptor.so.*.*.* | |
443 | %attr(755,root,root) %ghost %{_libdir}/libopencv_optflow.so.%{sover} | |
444 | %attr(755,root,root) %{_libdir}/libopencv_optflow.so.*.*.* | |
445 | %attr(755,root,root) %ghost %{_libdir}/libopencv_plot.so.%{sover} | |
446 | %attr(755,root,root) %{_libdir}/libopencv_plot.so.*.*.* | |
447 | %attr(755,root,root) %ghost %{_libdir}/libopencv_reg.so.%{sover} | |
448 | %attr(755,root,root) %{_libdir}/libopencv_reg.so.*.*.* | |
449 | %attr(755,root,root) %ghost %{_libdir}/libopencv_rgbd.so.%{sover} | |
450 | %attr(755,root,root) %{_libdir}/libopencv_rgbd.so.*.*.* | |
451 | %attr(755,root,root) %ghost %{_libdir}/libopencv_saliency.so.%{sover} | |
452 | %attr(755,root,root) %{_libdir}/libopencv_saliency.so.*.*.* | |
453 | %attr(755,root,root) %ghost %{_libdir}/libopencv_sfm.so.%{sover} | |
454 | %attr(755,root,root) %{_libdir}/libopencv_sfm.so.*.*.* | |
455 | %attr(755,root,root) %ghost %{_libdir}/libopencv_stereo.so.%{sover} | |
456 | %attr(755,root,root) %{_libdir}/libopencv_stereo.so.*.*.* | |
457 | %attr(755,root,root) %ghost %{_libdir}/libopencv_structured_light.so.%{sover} | |
458 | %attr(755,root,root) %{_libdir}/libopencv_structured_light.so.*.*.* | |
459 | %attr(755,root,root) %ghost %{_libdir}/libopencv_surface_matching.so.%{sover} | |
460 | %attr(755,root,root) %{_libdir}/libopencv_surface_matching.so.*.*.* | |
461 | %attr(755,root,root) %ghost %{_libdir}/libopencv_text.so.%{sover} | |
462 | %attr(755,root,root) %{_libdir}/libopencv_text.so.*.*.* | |
463 | %attr(755,root,root) %ghost %{_libdir}/libopencv_tracking.so.%{sover} | |
464 | %attr(755,root,root) %{_libdir}/libopencv_tracking.so.*.*.* | |
465 | %attr(755,root,root) %ghost %{_libdir}/libopencv_xfeatures2d.so.%{sover} | |
466 | %attr(755,root,root) %{_libdir}/libopencv_xfeatures2d.so.*.*.* | |
467 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ximgproc.so.%{sover} | |
468 | %attr(755,root,root) %{_libdir}/libopencv_ximgproc.so.*.*.* | |
469 | %attr(755,root,root) %ghost %{_libdir}/libopencv_xobjdetect.so.%{sover} | |
470 | %attr(755,root,root) %{_libdir}/libopencv_xobjdetect.so.*.*.* | |
471 | %attr(755,root,root) %ghost %{_libdir}/libopencv_xphoto.so.%{sover} | |
472 | %attr(755,root,root) %{_libdir}/libopencv_xphoto.so.*.*.* | |
473 | %dir %{_datadir}/OpenCV | |
474 | %{_datadir}/OpenCV/haarcascades | |
475 | %{_datadir}/OpenCV/lbpcascades | |
476 | ||
477 | %files core | |
478 | %defattr(644,root,root,755) | |
479 | %attr(755,root,root) %{_libdir}/libopencv_core.so.*.*.* | |
480 | %attr(755,root,root) %ghost %{_libdir}/libopencv_core.so.%{sover} | |
481 | %attr(755,root,root) %{_libdir}/libopencv_flann.so.*.*.* | |
482 | %attr(755,root,root) %ghost %{_libdir}/libopencv_flann.so.%{sover} | |
483 | %attr(755,root,root) %{_libdir}/libopencv_imgproc.so.*.*.* | |
484 | %attr(755,root,root) %ghost %{_libdir}/libopencv_imgproc.so.%{sover} | |
485 | %attr(755,root,root) %{_libdir}/libopencv_ml.so.*.*.* | |
486 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ml.so.%{sover} | |
487 | %attr(755,root,root) %{_libdir}/libopencv_photo.so.*.*.* | |
488 | %attr(755,root,root) %ghost %{_libdir}/libopencv_photo.so.%{sover} | |
489 | %attr(755,root,root) %{_libdir}/libopencv_video.so.*.*.* | |
490 | %attr(755,root,root) %ghost %{_libdir}/libopencv_video.so.%{sover} | |
491 | %attr(755,root,root) %{_libdir}/libopencv_imgcodecs.so.*.*.* | |
492 | %attr(755,root,root) %ghost %{_libdir}/libopencv_imgcodecs.so.%{sover} | |
493 | %attr(755,root,root) %{_libdir}/libopencv_shape.so.*.*.* | |
494 | %attr(755,root,root) %ghost %{_libdir}/libopencv_shape.so.%{sover} | |
495 | %attr(755,root,root) %{_libdir}/libopencv_videoio.so.*.*.* | |
496 | %attr(755,root,root) %ghost %{_libdir}/libopencv_videoio.so.%{sover} | |
497 | ||
498 | %if %{with vtk} | |
499 | %files viz | |
500 | %defattr(644,root,root,755) | |
501 | %attr(755,root,root) %{_libdir}/libopencv_viz.so.*.*.* | |
502 | %attr(755,root,root) %ghost %{_libdir}/libopencv_viz.so.%{sover} | |
503 | %endif | |
504 | ||
505 | %files devel | |
506 | %defattr(644,root,root,755) | |
507 | # core | |
508 | %attr(755,root,root) %{_libdir}/libopencv_core.so | |
509 | %attr(755,root,root) %{_libdir}/libopencv_flann.so | |
510 | %attr(755,root,root) %{_libdir}/libopencv_imgproc.so | |
511 | %attr(755,root,root) %{_libdir}/libopencv_ml.so | |
512 | %attr(755,root,root) %{_libdir}/libopencv_photo.so | |
513 | %attr(755,root,root) %{_libdir}/libopencv_video.so | |
514 | # GUI/extensions (base package) | |
515 | %attr(755,root,root) %{_libdir}/libopencv_calib3d.so | |
516 | %attr(755,root,root) %{_libdir}/libopencv_features2d.so | |
517 | %attr(755,root,root) %{_libdir}/libopencv_highgui.so | |
518 | %attr(755,root,root) %{_libdir}/libopencv_objdetect.so | |
519 | %attr(755,root,root) %{_libdir}/libopencv_stitching.so | |
520 | %attr(755,root,root) %{_libdir}/libopencv_superres.so | |
521 | %attr(755,root,root) %{_libdir}/libopencv_videostab.so | |
522 | %attr(755,root,root) %{_libdir}/libopencv_imgcodecs.so | |
523 | %attr(755,root,root) %{_libdir}/libopencv_shape.so | |
524 | %attr(755,root,root) %{_libdir}/libopencv_videoio.so | |
525 | # contrib | |
526 | %attr(755,root,root) %{_libdir}/libopencv_aruco.so | |
527 | %attr(755,root,root) %{_libdir}/libopencv_bgsegm.so | |
528 | %attr(755,root,root) %{_libdir}/libopencv_bioinspired.so | |
529 | %attr(755,root,root) %{_libdir}/libopencv_ccalib.so | |
530 | %attr(755,root,root) %{_libdir}/libopencv_datasets.so | |
531 | %attr(755,root,root) %{_libdir}/libopencv_dnn.so | |
532 | %attr(755,root,root) %{_libdir}/libopencv_dpm.so | |
533 | %attr(755,root,root) %{_libdir}/libopencv_face.so | |
534 | %attr(755,root,root) %{_libdir}/libopencv_fuzzy.so | |
535 | %attr(755,root,root) %{_libdir}/libopencv_hdf.so | |
536 | %attr(755,root,root) %{_libdir}/libopencv_line_descriptor.so | |
537 | %attr(755,root,root) %{_libdir}/libopencv_optflow.so | |
538 | %attr(755,root,root) %{_libdir}/libopencv_plot.so | |
539 | %attr(755,root,root) %{_libdir}/libopencv_reg.so | |
540 | %attr(755,root,root) %{_libdir}/libopencv_rgbd.so | |
541 | %attr(755,root,root) %{_libdir}/libopencv_saliency.so | |
542 | %attr(755,root,root) %{_libdir}/libopencv_sfm.so | |
543 | %attr(755,root,root) %{_libdir}/libopencv_stereo.so | |
544 | %attr(755,root,root) %{_libdir}/libopencv_structured_light.so | |
545 | %attr(755,root,root) %{_libdir}/libopencv_surface_matching.so | |
546 | %attr(755,root,root) %{_libdir}/libopencv_text.so | |
547 | %attr(755,root,root) %{_libdir}/libopencv_tracking.so | |
548 | %attr(755,root,root) %{_libdir}/libopencv_xfeatures2d.so | |
549 | %attr(755,root,root) %{_libdir}/libopencv_ximgproc.so | |
550 | %attr(755,root,root) %{_libdir}/libopencv_xobjdetect.so | |
551 | %attr(755,root,root) %{_libdir}/libopencv_xphoto.so | |
552 | %{_libdir}/libopencv_ts.a | |
553 | # viz | |
554 | %if %{with vtk} | |
555 | %attr(755,root,root) %{_libdir}/libopencv_viz.so | |
556 | %endif | |
557 | %{_includedir}/opencv | |
558 | %{_includedir}/opencv2 | |
559 | %{_datadir}/OpenCV/OpenCV*.cmake | |
560 | %{_pkgconfigdir}/opencv.pc | |
561 | ||
562 | %files doc | |
563 | %defattr(644,root,root,755) | |
564 | # TODO: probably could rebuild them and package via make install | |
565 | %doc doc/* | |
566 | ||
567 | %if %{with examples} | |
568 | %files examples | |
569 | %defattr(644,root,root,755) | |
570 | %{_examplesdir}/%{name}-%{version} | |
571 | %endif | |
572 | ||
573 | %if %{with java} | |
574 | %files -n java-opencv | |
575 | %defattr(644,root,root,755) | |
576 | %attr(755,root,root) %{_libdir}/libopencv_java%{jver}.so | |
577 | %{_javadir}/opencv-%{jver}.jar | |
578 | %{_javadir}/opencv.jar | |
579 | %endif | |
580 | ||
581 | %files -n python-opencv | |
582 | %defattr(644,root,root,755) | |
583 | %attr(755,root,root) %{py_sitedir}/cv2.so | |
584 | ||
585 | %files -n python3-opencv | |
586 | %defattr(644,root,root,755) | |
587 | %attr(755,root,root) %{py3_sitedir}/cv2.cpython-*.so |