]>
Commit | Line | Data |
---|---|---|
8d499a62 | 1 | # TODO: |
2acd8ac1 | 2 | # - Smartek GigEVisionSDK (http://www.smartekvision.com/ but I can't see SDK with Linux library?) |
da5d1e09 | 3 | # - CUDA, CUFFT, CUBLAS, NVCUVID support (on bcond) |
5df3cf1b | 4 | # - ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary) |
a8d52c2e | 5 | # |
0c2d6b7d | 6 | # Conditional build: |
a55ba198 JB |
7 | # - general options: |
8 | %bcond_with tbb # Threading Building Blocks support (everywhere) | |
9 | %bcond_with sse # use SSE instructions | |
10 | %bcond_with sse2 # use SSE2 instructions | |
da5d1e09 JB |
11 | %bcond_with sse3 # use SSE3 instructions |
12 | %bcond_with ssse3 # use SSSE3 instructions | |
13 | %bcond_with sse41 # use SSE4.1 instructions | |
14 | %bcond_with sse42 # use SSE4.2 instructions | |
15 | %bcond_with avx # use AVX instructions | |
8d5385eb JB |
16 | %bcond_without opencl # OpenCL support |
17 | %bcond_with opencl_amdblas # AMD OpenCL BLAS routines | |
18 | %bcond_with opencl_amdfft # AMD OpenCL FFT routines | |
19 | %bcond_without opengl # OpenGL support | |
cf32945e | 20 | %bcond_without gomp # OpenMP support (available when not using tbb) |
200823d5 | 21 | %bcond_without examples # Install examples |
b07433c6 JB |
22 | # - bindings |
23 | %bcond_without java # Java binding | |
a55ba198 | 24 | # - highgui options: |
b3920a9d | 25 | %bcond_without ffmpeg # FFMpeg support in highgui |
1c9fe580 JB |
26 | %bcond_without gstreamer # GStreamer support in highgui |
27 | %bcond_with openni # OpenNI (Natural Interaction) support in highgui | |
a55ba198 | 28 | %bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary) |
1c9fe580 | 29 | %bcond_with qt # Qt backend instead of GTK+ in highgui |
1c9fe580 | 30 | %bcond_with unicap # Unicap support in highgui (GPL) |
da5d1e09 | 31 | %bcond_without v4l # Video4Linux in highgui |
a55ba198 | 32 | %bcond_with ximea # m3API (XIMEA cameras) support in highgui (proprietary) |
1c9fe580 | 33 | %bcond_with xine # XINE support in highgui (GPL) |
cf32945e JB |
34 | # - other modules |
35 | %bcond_without vtk # VTK library support (opencv_viz module) | |
a4737151 | 36 | |
1c9fe580 JB |
37 | %ifarch pentium3 pentium4 %{x8664} |
38 | %define with_sse 1 | |
39 | %endif | |
40 | %ifarch pentium4 %{x8664} | |
41 | %define with_sse2 1 | |
42 | %endif | |
901927d3 | 43 | Summary: A library of programming functions mainly aimed at real time computer vision |
0c2d6b7d | 44 | Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym |
901927d3 | 45 | Name: opencv |
200823d5 | 46 | Version: 2.4.9 |
fa364655 | 47 | Release: 10 |
901927d3 | 48 | Epoch: 1 |
d5e56e66 JB |
49 | %if %{with unicap} || %{with xine} |
50 | License: GPL (enforced by used libraries), BSD (opencv itself) | |
51 | %else | |
901927d3 | 52 | License: BSD |
d5e56e66 | 53 | %endif |
901927d3 | 54 | Group: Libraries |
200823d5 ER |
55 | Source0: https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.tar.gz |
56 | # Source0-md5: cc0a8307403ff471f554197401ec0eb9 | |
452b38e1 | 57 | Patch0: %{name}-cflags.patch |
58 | Patch1: %{name}-link.patch | |
59 | Patch2: %{name}-unicap-c++.patch | |
60 | Patch3: %{name}-c.patch | |
61 | Patch4: %{name}-gcc.patch | |
809ce413 | 62 | Patch5: %{name}-ximea.patch |
6994c4f7 | 63 | Patch6: %{name}-ocl-fft.patch |
a4737151 | 64 | Patch7: java-ant-sourcelevel.patch |
da5d1e09 | 65 | Patch8: %{name}-shared.patch |
200823d5 | 66 | URL: http://www.opencv.org/ |
d5e56e66 | 67 | %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel} |
8d5385eb | 68 | %{?with_opencl:BuildRequires: OpenCL-devel} |
0c2d6b7d | 69 | BuildRequires: OpenEXR-devel |
5df3cf1b | 70 | %{?with_opengl:BuildRequires: OpenGL-GLU-devel} |
9f0b035c | 71 | %{?with_opengl:BuildRequires: OpenGL-devel} |
5df3cf1b | 72 | # as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, but the result is not used |
1c9fe580 | 73 | %{?with_openni:BuildRequires: OpenNI-devel} |
da5d1e09 | 74 | %{?with_ximea:BuildRequires: XIMEA-devel >= 4} |
b07433c6 | 75 | %{?with_java:BuildRequires: ant} |
ef4af528 JB |
76 | %{?with_opencl_amdblas:BuildRequires: clAmdBlas-devel} |
77 | %{?with_opencl_amdfft:BuildRequires: clAmdFft-devel} | |
b07433c6 | 78 | BuildRequires: cmake >= 2.8 |
0c2d6b7d | 79 | BuildRequires: doxygen |
809ce413 | 80 | BuildRequires: eigen3 >= 3 |
b3920a9d | 81 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.7} |
da5d1e09 | 82 | %{?with_gomp:BuildRequires: gcc-c++ >= 6:4.2} |
0c2d6b7d JB |
83 | %if %{with gstreamer} |
84 | BuildRequires: gstreamer-devel >= 0.10 | |
85 | BuildRequires: gstreamer-plugins-base-devel >= 0.10 | |
86 | %endif | |
901927d3 | 87 | BuildRequires: jasper-devel |
b07433c6 | 88 | %{?with_java:BuildRequires: jdk} |
901927d3 | 89 | BuildRequires: libdc1394-devel |
da5d1e09 | 90 | %{?with_gomp:BuildRequires: libgomp-devel} |
901927d3 AM |
91 | BuildRequires: libjpeg-devel |
92 | BuildRequires: libpng-devel | |
93 | BuildRequires: libraw1394-devel | |
0c2d6b7d | 94 | BuildRequires: libstdc++-devel |
901927d3 | 95 | BuildRequires: libtiff-devel |
148338c5 | 96 | BuildRequires: libtool |
d5e56e66 JB |
97 | %if %{with unicap} |
98 | BuildRequires: libucil-devel | |
99 | BuildRequires: libunicap-devel | |
100 | %endif | |
0c2d6b7d | 101 | BuildRequires: libv4l-devel |
af6d2888 | 102 | BuildRequires: pkgconfig |
b07433c6 | 103 | BuildRequires: python |
901927d3 | 104 | BuildRequires: python-devel |
0c2d6b7d | 105 | BuildRequires: python-numpy-devel |
901927d3 | 106 | BuildRequires: rpm-pythonprov |
8d499a62 | 107 | BuildRequires: rpmbuild(macros) >= 1.606 |
1376dffe | 108 | BuildRequires: sed >= 4.0 |
996927aa | 109 | BuildRequires: swig-python |
f8e040cc | 110 | %{?with_tbb:BuildRequires: tbb-devel} |
ae3d975d AM |
111 | %if %{with vtk} |
112 | BuildRequires: vtk-devel >= 5.8.0 | |
fba97d16 | 113 | BuildRequires: vtk-java >= 5.8.0 |
ae3d975d AM |
114 | BuildRequires: vtk-tcl >= 5.8.0 |
115 | %endif | |
901927d3 | 116 | %{?with_xine:BuildRequires: xine-lib-devel} |
452b38e1 | 117 | BuildRequires: zlib-devel |
4afb606b | 118 | %if %{with qt} |
4afb606b JB |
119 | BuildRequires: QtCore-devel >= 4 |
120 | BuildRequires: QtGui-devel >= 4 | |
5df3cf1b | 121 | %{?with_opengl:BuildRequires: QtOpenGL-devel >= 4} |
4afb606b JB |
122 | BuildRequires: qt4-qmake >= 4 |
123 | %else | |
124 | BuildRequires: gtk+2-devel >= 2.0 | |
5df3cf1b | 125 | %{?with_opengl:BuildRequires: gtkglext-devel >= 1.0} |
4afb606b | 126 | %endif |
da5d1e09 | 127 | Requires: %{name}-core = %{epoch}:%{version}-%{release} |
901927d3 AM |
128 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
129 | ||
933de752 | 130 | %define sover %(v=%{version}; k=${v#?.?.?}; echo ${v%$k}) |
835e0cdd | 131 | %define jver %(echo %{version} | tr -d .) |
933de752 | 132 | |
901927d3 AM |
133 | %description |
134 | OpenCV (Open Source Computer Vision) is a library of programming | |
135 | functions mainly aimed at real time computer vision. | |
136 | ||
0c2d6b7d JB |
137 | Example applications of the OpenCV library are: |
138 | - Human-Computer Interaction (HCI) | |
139 | - Object Identification, Segmentation and Recognition | |
140 | - Face Recognition | |
141 | - Gesture Recognition | |
142 | - Motion Tracking | |
143 | - Ego Motion, Motion Understanding | |
144 | - Structure From Motion (SFM) | |
145 | - Stereo and Multi-Camera Calibration and Depth Computation | |
146 | - Mobile Robotics. | |
147 | ||
148 | %description -l pl.UTF-8 | |
149 | OpenCV (Open Source Computer Vision) to biblioteka funkcji | |
150 | przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym. | |
151 | ||
152 | Przykładowe zastosowania biblioteki OpenCV to | |
153 | - interakcje człowiek-komputer (HCI) | |
154 | - identyfikacja, segmentacja i rozpoznawanie obiektów | |
155 | - rozpoznawanie twarzy | |
156 | - rozpoznawanie gestów | |
157 | - śledzenie ruchu | |
158 | - rozumienie ruchu | |
159 | - SFM (Structure From Motion) | |
160 | - kalibracja dwu- i wielokamerowa, obliczanie głębi | |
161 | - robotyka ruchu. | |
901927d3 | 162 | |
933de752 ER |
163 | %package core |
164 | Summary: OpenCV core libraries | |
da5d1e09 | 165 | Summary(pl.UTF-8): Podstawowe biblioteki OpenCV |
933de752 | 166 | Group: Libraries |
da5d1e09 | 167 | Conflicts: opencv < 2.4.6.2-1 |
933de752 ER |
168 | |
169 | %description core | |
170 | This package contains the OpenCV C/C++ core libraries. | |
171 | ||
da5d1e09 JB |
172 | %description core -l pl.UTF-8 |
173 | Ten pakiet zawiera podstawowe biblioteki C/C++ OpenCV. | |
174 | ||
cf32945e JB |
175 | %package viz |
176 | Summary: OpenCV viz library (VTK support) | |
177 | Summary(pl.UTF-8): Biblioteka OpenCV viz (obsługa VTK) | |
178 | Group: Libraries | |
179 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
180 | ||
181 | %description viz | |
182 | OpenCV viz library (VTK support). | |
183 | ||
184 | %description viz -l pl.UTF-8 | |
185 | Biblioteka OpenCV viz (obsługa VTK). | |
186 | ||
901927d3 | 187 | %package devel |
0c2d6b7d JB |
188 | Summary: Header files for OpenCV library |
189 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV | |
901927d3 AM |
190 | Group: Development/Libraries |
191 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
cf32945e JB |
192 | %if %{with vtk} |
193 | Requires: %{name}-viz = %{epoch}:%{version}-%{release} | |
194 | %endif | |
0c2d6b7d | 195 | Obsoletes: opencv-static |
901927d3 AM |
196 | |
197 | %description devel | |
0c2d6b7d | 198 | Header files for OpenCV library. |
901927d3 | 199 | |
0c2d6b7d JB |
200 | %description devel -l pl.UTF-8 |
201 | Pliki nagłówkowe biblioteki OpenCV. | |
901927d3 | 202 | |
9141b1e2 ER |
203 | %package doc |
204 | Summary: Manual for OpenCV | |
205 | Summary(fr.UTF-8): Documentation pour OpenCV | |
206 | Summary(it.UTF-8): Documentazione di OpenCV | |
207 | Summary(pl.UTF-8): Podręcznik dla OpenCV | |
208 | Group: Documentation | |
209 | # noarch subpackages only when building with rpm5 | |
210 | %if "%{_rpmversion}" >= "5" | |
211 | BuildArch: noarch | |
212 | %endif | |
213 | ||
214 | %description doc | |
215 | Documentation for OpenCV. | |
216 | ||
217 | %description doc -l fr.UTF-8 | |
218 | Documentation pour OpenCV. | |
219 | ||
220 | %description doc -l it.UTF-8 | |
221 | Documentazione di OpenCV. | |
222 | ||
223 | %description doc -l pl.UTF-8 | |
224 | Dokumentacja do OpenCV. | |
225 | ||
200823d5 ER |
226 | %package examples |
227 | Summary: OpenCV code examples | |
228 | Group: Documentation | |
229 | %if "%{_rpmversion}" >= "5" | |
230 | BuildArch: noarch | |
231 | %endif | |
232 | ||
233 | %description examples | |
234 | OpenCV code examples. | |
235 | ||
b07433c6 JB |
236 | %package -n java-opencv |
237 | Summary: OpenCV Java bindings | |
238 | Summary(pl.UTF-8): Wiązania Javy do OpenCV | |
239 | Group: Libraries/Java | |
240 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
241 | Requires: jre | |
242 | ||
243 | %description -n java-opencv | |
244 | OpenCV Java bindings. | |
245 | ||
246 | %description -n java-opencv -l pl.UTF-8 | |
247 | Wiązania Javy do OpenCV. | |
248 | ||
901927d3 AM |
249 | %package -n python-opencv |
250 | Summary: OpenCV Python bindings | |
0c2d6b7d JB |
251 | Summary(pl.UTF-8): Wiązania Pythona do OpenCV |
252 | Group: Libraries/Python | |
cd1f0136 | 253 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9f0b035c | 254 | Requires: python-libs |
901927d3 AM |
255 | |
256 | %description -n python-opencv | |
257 | OpenCV Python bindings. | |
258 | ||
0c2d6b7d JB |
259 | %description -n python-opencv -l pl.UTF-8 |
260 | Wiązania Pythona do OpenCV. | |
261 | ||
901927d3 | 262 | %prep |
25269a76 | 263 | %setup -q |
54551f29 | 264 | |
da67222a | 265 | %undos CMakeLists.txt |
1376dffe | 266 | %undos modules/gpu/CMakeLists.txt |
54551f29 | 267 | |
1376dffe | 268 | %patch0 -p1 |
269 | %patch1 -p1 | |
29d82ddf | 270 | %patch2 -p1 |
f8e040cc | 271 | %patch3 -p1 |
75b912e9 | 272 | %patch4 -p1 |
809ce413 | 273 | %patch5 -p1 |
6994c4f7 | 274 | %patch6 -p1 |
a4737151 | 275 | %patch7 -p1 |
da5d1e09 | 276 | %patch8 -p1 |
148338c5 | 277 | |
901927d3 | 278 | %build |
95daeb66 AM |
279 | install -d build |
280 | cd build | |
ea26b025 ER |
281 | |
282 | # handle cmake & ccache | |
283 | # http://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmakec | |
284 | if [[ "%{__cc}" = *ccache* ]]; then | |
285 | cc="%{__cc}" | |
286 | cxx="%{__cxx}" | |
287 | ccache=" | |
288 | -DCMAKE_C_COMPILER="ccache" -DCMAKE_C_COMPILER_ARG1="${cc#ccache }" \ | |
289 | -DCMAKE_CXX_COMPILER="ccache" -DCMAKE_CXX_COMPILER_ARG1="${cxx#ccache }" \ | |
290 | " | |
291 | fi | |
292 | ||
0c2d6b7d | 293 | %cmake .. \ |
ea26b025 | 294 | $ccache \ |
da5d1e09 | 295 | -DENABLE_AVX=%{?with_avx:ON}%{!?with_avx:OFF} \ |
1c9fe580 JB |
296 | -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \ |
297 | -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \ | |
da5d1e09 JB |
298 | -DENABLE_SSE3=%{?with_sse3:ON}%{!?with_sse3:OFF} \ |
299 | -DENABLE_SSSE3=%{?with_ssse3:ON}%{!?with_ssse3:OFF} \ | |
300 | -DENABLE_SSE41=%{?with_sse41:ON}%{!?with_sse41:OFF} \ | |
301 | -DENABLE_SSE42=%{?with_sse42:ON}%{!?with_sse42:OFF} \ | |
95daeb66 | 302 | -DBUILD_NEW_PYTHON_SUPPORT=ON \ |
200823d5 ER |
303 | %if %{with examples} |
304 | -DINSTALL_C_EXAMPLES=ON \ | |
305 | -DINSTALL_PYTHON_EXAMPLES=ON \ | |
306 | %endif | |
b3920a9d | 307 | %{?with_ffmpeg:-DWITH_FFMPEG=ON} \ |
d5e56e66 | 308 | %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \ |
8d5385eb | 309 | %{?with_opencl:-DWITH_OPENCL=ON} \ |
faf80a1c JB |
310 | %{!?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=OFF} \ |
311 | %{!?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=OFF} \ | |
5df3cf1b | 312 | %{?with_opengl:-DWITH_OPENGL=ON} \ |
da5d1e09 | 313 | %{?with_gomp:-DWITH_OPENMP=ON} \ |
1c9fe580 | 314 | %{?with_openni:-DWITH_OPENNI=ON} \ |
809ce413 | 315 | %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \ |
5df3cf1b | 316 | %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \ |
f8e040cc | 317 | %{?with_tbb:-DWITH_TBB=ON} \ |
d5e56e66 | 318 | %{?with_unicap:-DWITH_UNICAP=ON} \ |
ed358224 | 319 | %{!?with_v4l:-DWITH_V4L=OFF} \ |
cf32945e | 320 | %{?with_vtk:-DWITH_VTK=ON} \ |
a55ba198 | 321 | %{?with_ximea:-DWITH_XIMEA=ON} \ |
d5e56e66 | 322 | %{?with_xine:-DWITH_XINE=ON} |
54551f29 | 323 | |
8b9f61f7 | 324 | %{__make} |
901927d3 AM |
325 | |
326 | %install | |
327 | rm -rf $RPM_BUILD_ROOT | |
95daeb66 | 328 | %{__make} -C build install \ |
901927d3 AM |
329 | DESTDIR=$RPM_BUILD_ROOT |
330 | ||
9141b1e2 ER |
331 | # see -doc package |
332 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/OpenCV/doc | |
200823d5 ER |
333 | %if %{with examples} |
334 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
335 | mv $RPM_BUILD_ROOT%{_datadir}/OpenCV/samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
336 | %endif | |
9141b1e2 | 337 | |
4bd2eae7 | 338 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
a4737151 | 339 | cp -p build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir} |
4bd2eae7 | 340 | |
8d499a62 JB |
341 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
342 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
343 | %py_postclean | |
344 | ||
b07433c6 JB |
345 | %if %{with java} |
346 | # move to proper directories, create symlink | |
347 | install -d $RPM_BUILD_ROOT%{_javadir} | |
348 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/OpenCV/java/libopencv_java*.so $RPM_BUILD_ROOT%{_libdir} | |
c3075463 AM |
349 | sed -i -e 's#/share/OpenCV/java/libopencv_java%{jver}\.so#/%{_lib}/libopencv_java%{jver}.so#g' \ |
350 | $RPM_BUILD_ROOT%{_datadir}/OpenCV/OpenCVModules-pld.cmake | |
b07433c6 JB |
351 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/OpenCV/java/opencv-*.jar $RPM_BUILD_ROOT%{_javadir} |
352 | rmdir $RPM_BUILD_ROOT%{_datadir}/OpenCV/java | |
353 | ln -sf $(basename $RPM_BUILD_ROOT%{_javadir}/opencv-*.jar) $RPM_BUILD_ROOT%{_javadir}/opencv.jar | |
354 | %endif | |
355 | ||
901927d3 AM |
356 | %clean |
357 | rm -rf $RPM_BUILD_ROOT | |
358 | ||
359 | %post -p /sbin/ldconfig | |
360 | %postun -p /sbin/ldconfig | |
361 | ||
933de752 ER |
362 | %post core -p /sbin/ldconfig |
363 | %postun core -p /sbin/ldconfig | |
364 | ||
485d5dca JB |
365 | %post viz -p /sbin/ldconfig |
366 | %postun viz -p /sbin/ldconfig | |
367 | ||
b07433c6 JB |
368 | %post -n java-opencv -p /sbin/ldconfig |
369 | %postun -n java-opencv -p /sbin/ldconfig | |
370 | ||
901927d3 AM |
371 | %files |
372 | %defattr(644,root,root,755) | |
933de752 ER |
373 | %attr(755,root,root) %{_bindir}/opencv_createsamples |
374 | %attr(755,root,root) %{_bindir}/opencv_haartraining | |
375 | %attr(755,root,root) %{_bindir}/opencv_performance | |
376 | %attr(755,root,root) %{_bindir}/opencv_traincascade | |
377 | %attr(755,root,root) %{_libdir}/libopencv_calib3d.so.%{sover} | |
da5d1e09 | 378 | %attr(755,root,root) %ghost %{_libdir}/libopencv_calib3d.so.2.4 |
933de752 | 379 | %attr(755,root,root) %{_libdir}/libopencv_contrib.so.%{sover} |
da5d1e09 | 380 | %attr(755,root,root) %ghost %{_libdir}/libopencv_contrib.so.2.4 |
933de752 | 381 | %attr(755,root,root) %{_libdir}/libopencv_features2d.so.%{sover} |
da5d1e09 | 382 | %attr(755,root,root) %ghost %{_libdir}/libopencv_features2d.so.2.4 |
cf32945e JB |
383 | %attr(755,root,root) %{_libdir}/libopencv_gpu.so.%{sover} |
384 | %attr(755,root,root) %ghost %{_libdir}/libopencv_gpu.so.2.4 | |
933de752 | 385 | %attr(755,root,root) %{_libdir}/libopencv_highgui.so.%{sover} |
da5d1e09 | 386 | %attr(755,root,root) %ghost %{_libdir}/libopencv_highgui.so.2.4 |
933de752 | 387 | %attr(755,root,root) %{_libdir}/libopencv_legacy.so.%{sover} |
da5d1e09 | 388 | %attr(755,root,root) %ghost %{_libdir}/libopencv_legacy.so.2.4 |
cf32945e JB |
389 | %attr(755,root,root) %{_libdir}/libopencv_nonfree.so.%{sover} |
390 | %attr(755,root,root) %ghost %{_libdir}/libopencv_nonfree.so.2.4 | |
933de752 | 391 | %attr(755,root,root) %{_libdir}/libopencv_objdetect.so.%{sover} |
da5d1e09 JB |
392 | %attr(755,root,root) %ghost %{_libdir}/libopencv_objdetect.so.2.4 |
393 | %if %{with opencl} | |
394 | %attr(755,root,root) %{_libdir}/libopencv_ocl.so.%{sover} | |
395 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ocl.so.2.4 | |
396 | %endif | |
933de752 | 397 | %attr(755,root,root) %{_libdir}/libopencv_stitching.so.%{sover} |
da5d1e09 | 398 | %attr(755,root,root) %ghost %{_libdir}/libopencv_stitching.so.2.4 |
933de752 | 399 | %attr(755,root,root) %{_libdir}/libopencv_superres.so.%{sover} |
da5d1e09 | 400 | %attr(755,root,root) %ghost %{_libdir}/libopencv_superres.so.2.4 |
cf32945e JB |
401 | %attr(755,root,root) %{_libdir}/libopencv_ts.so.%{sover} |
402 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ts.so.2.4 | |
933de752 | 403 | %attr(755,root,root) %{_libdir}/libopencv_videostab.so.%{sover} |
da5d1e09 | 404 | %attr(755,root,root) %ghost %{_libdir}/libopencv_videostab.so.2.4 |
452b38e1 | 405 | %dir %{_datadir}/OpenCV |
452b38e1 | 406 | %{_datadir}/OpenCV/haarcascades |
407 | %{_datadir}/OpenCV/lbpcascades | |
901927d3 | 408 | |
933de752 ER |
409 | %files core |
410 | %defattr(644,root,root,755) | |
411 | %attr(755,root,root) %{_libdir}/libopencv_core.so.%{sover} | |
cf32945e | 412 | %attr(755,root,root) %ghost %{_libdir}/libopencv_core.so.2.4 |
933de752 | 413 | %attr(755,root,root) %{_libdir}/libopencv_flann.so.%{sover} |
cf32945e | 414 | %attr(755,root,root) %ghost %{_libdir}/libopencv_flann.so.2.4 |
933de752 | 415 | %attr(755,root,root) %{_libdir}/libopencv_imgproc.so.%{sover} |
cf32945e | 416 | %attr(755,root,root) %ghost %{_libdir}/libopencv_imgproc.so.2.4 |
933de752 | 417 | %attr(755,root,root) %{_libdir}/libopencv_ml.so.%{sover} |
cf32945e | 418 | %attr(755,root,root) %ghost %{_libdir}/libopencv_ml.so.2.4 |
933de752 | 419 | %attr(755,root,root) %{_libdir}/libopencv_photo.so.%{sover} |
cf32945e | 420 | %attr(755,root,root) %ghost %{_libdir}/libopencv_photo.so.2.4 |
933de752 | 421 | %attr(755,root,root) %{_libdir}/libopencv_video.so.%{sover} |
cf32945e JB |
422 | %attr(755,root,root) %ghost %{_libdir}/libopencv_video.so.2.4 |
423 | ||
424 | %if %{with vtk} | |
425 | %files viz | |
426 | %defattr(644,root,root,755) | |
427 | %attr(755,root,root) %{_libdir}/libopencv_viz.so.%{sover} | |
428 | %attr(755,root,root) %ghost %{_libdir}/libopencv_viz.so.2.4 | |
429 | %endif | |
933de752 | 430 | |
901927d3 AM |
431 | %files devel |
432 | %defattr(644,root,root,755) | |
cf32945e JB |
433 | # core |
434 | %attr(755,root,root) %{_libdir}/libopencv_core.so | |
435 | %attr(755,root,root) %{_libdir}/libopencv_flann.so | |
436 | %attr(755,root,root) %{_libdir}/libopencv_imgproc.so | |
437 | %attr(755,root,root) %{_libdir}/libopencv_ml.so | |
438 | %attr(755,root,root) %{_libdir}/libopencv_photo.so | |
439 | %attr(755,root,root) %{_libdir}/libopencv_video.so | |
440 | # GUI/extensions (base package) | |
441 | %attr(755,root,root) %{_libdir}/libopencv_calib3d.so | |
442 | %attr(755,root,root) %{_libdir}/libopencv_contrib.so | |
443 | %attr(755,root,root) %{_libdir}/libopencv_features2d.so | |
444 | %attr(755,root,root) %{_libdir}/libopencv_gpu.so | |
445 | %attr(755,root,root) %{_libdir}/libopencv_highgui.so | |
446 | %attr(755,root,root) %{_libdir}/libopencv_legacy.so | |
447 | %attr(755,root,root) %{_libdir}/libopencv_nonfree.so | |
448 | %attr(755,root,root) %{_libdir}/libopencv_objdetect.so | |
449 | %if %{with opencl} | |
450 | %attr(755,root,root) %{_libdir}/libopencv_ocl.so | |
451 | %endif | |
452 | %attr(755,root,root) %{_libdir}/libopencv_stitching.so | |
453 | %attr(755,root,root) %{_libdir}/libopencv_superres.so | |
454 | %attr(755,root,root) %{_libdir}/libopencv_ts.so | |
455 | %attr(755,root,root) %{_libdir}/libopencv_videostab.so | |
456 | # viz | |
457 | %if %{with vtk} | |
458 | %attr(755,root,root) %{_libdir}/libopencv_viz.so | |
0e077f8d | 459 | %endif |
901927d3 | 460 | %{_includedir}/opencv |
509c07dc | 461 | %{_includedir}/opencv2 |
da5d1e09 | 462 | %{_datadir}/OpenCV/OpenCV*.cmake |
0c2d6b7d | 463 | %{_pkgconfigdir}/opencv.pc |
901927d3 | 464 | |
9141b1e2 ER |
465 | %files doc |
466 | %defattr(644,root,root,755) | |
467 | # TODO: probably could rebuild them and package via make install | |
468 | %doc doc/* | |
469 | ||
200823d5 ER |
470 | %if %{with examples} |
471 | %files examples | |
472 | %defattr(644,root,root,755) | |
473 | %{_examplesdir}/%{name}-%{version} | |
474 | %endif | |
475 | ||
b07433c6 JB |
476 | %if %{with java} |
477 | %files -n java-opencv | |
478 | %defattr(644,root,root,755) | |
835e0cdd ER |
479 | %attr(755,root,root) %{_libdir}/libopencv_java%{jver}.so |
480 | %{_javadir}/opencv-%{jver}.jar | |
b07433c6 JB |
481 | %{_javadir}/opencv.jar |
482 | %endif | |
483 | ||
901927d3 AM |
484 | %files -n python-opencv |
485 | %defattr(644,root,root,755) | |
452b38e1 | 486 | %attr(755,root,root) %{py_sitedir}/cv2.so |
8d499a62 | 487 | %{py_sitedir}/cv.py[co] |