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