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