]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
Update BR (maybe bogus)
[packages/opencv.git] / opencv.spec
CommitLineData
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 59Summary: A library of programming functions mainly aimed at real time computer vision
0c2d6b7d 60Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
901927d3 61Name: opencv
701be548 62Version: 4.5.1
e652d7a7 63Release: 2
901927d3 64Epoch: 1
d5e56e66
JB
65%if %{with unicap} || %{with xine}
66License: GPL (enforced by used libraries), BSD (opencv itself)
67%else
901927d3 68License: BSD
d5e56e66 69%endif
901927d3 70Group: Libraries
200823d5 71Source0: https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.tar.gz
701be548 72# Source0-md5: 2205d3169238ec1f184438a96de68513
b287af3c 73Source1: https://github.com/Itseez/opencv_contrib/archive/%{version}/%{name}_contrib-%{version}.tar.gz
701be548 74# Source1-md5: 19a31bf7271978ab426112dbf5d1b83f
8a121398
JR
75# See opencv_contrib-3.4.1/modules/xfeatures2d/cmake/download_boostdesc.cmake
76Source10: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
77# Source10-md5: 0ea90e7a8f3f7876d450e4149c97c74f
78Source11: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
79# Source11-md5: 232c966b13651bd0e46a1497b0852191
80Source12: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
81# Source12-md5: 324426a24fa56ad9c5b8e3e0b3e5303e
82Source13: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
83# Source13-md5: 202e1b3e9fec871b04da31f7f016679f
84Source14: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
85# Source14-md5: 98ea99d399965c03d555cef3ea502a0b
86Source15: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
87# Source15-md5: e6dcfa9f647779eb1ce446a8d759b6ea
88Source16: https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
89# Source16-md5: 0ae0675534aa318d9668f2a179c2a052
90# See opencv_contrib-3.4.1/modules/xfeatures2d/cmake/download_vgg.cmake
91Source20: https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
92# Source20-md5: e8d0dcd54d1bcfdc29203d011a797179
93Source21: https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
94# Source21-md5: 7126a5d9a8884ebca5aea5d63d677225
95Source22: https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
96# Source22-md5: 7cd47228edec52b6d82f46511af325c5
97Source23: https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
98# Source23-md5: 151805e03568c9f490a5e3a872777b75
454d8108 99# See opencv_contrib-3.4.1/modules/face/CMakeLists.txt
8a121398
JR
100Source30: https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
101# Source30-md5: 7505c44ca4eb54b4ab1e4777cb96ac05
701be548
JR
102# See opencv-4.5.1/modules/gapi/CMakeLists.txt
103Source40: https://github.com/opencv/ade/archive/v0.1.1f/v0.1.1f.zip
104# Source40-md5: b624b995ec9c439cbc2e9e6ee940d3a2
fe201543
JR
105Patch0: %{name}-ximea.patch
106Patch1: python-install.patch
e652d7a7 107Patch2: pkgconfig-paths.patch
200823d5 108URL: http://www.opencv.org/
d5e56e66 109%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
8d5385eb 110%{?with_opencl:BuildRequires: OpenCL-devel}
57f80647 111BuildRequires: Mesa-khrplatform-devel
0c2d6b7d 112BuildRequires: OpenEXR-devel
5df3cf1b 113%{?with_opengl:BuildRequires: OpenGL-GLU-devel}
9f0b035c 114%{?with_opengl:BuildRequires: OpenGL-devel}
5df3cf1b 115# as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
1c9fe580 116%{?with_openni:BuildRequires: OpenNI-devel}
da5d1e09 117%{?with_ximea:BuildRequires: XIMEA-devel >= 4}
b07433c6 118%{?with_java:BuildRequires: ant}
8a121398 119BuildRequires: boost-devel
ef4af528
JB
120%{?with_opencl_amdblas:BuildRequires: clAmdBlas-devel}
121%{?with_opencl_amdfft:BuildRequires: clAmdFft-devel}
b07433c6 122BuildRequires: cmake >= 2.8
0c2d6b7d 123BuildRequires: doxygen
809ce413 124BuildRequires: eigen3 >= 3
b3920a9d 125%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.7}
4a401ecc 126%{?with_openmp:BuildRequires: gcc-c++ >= 6:4.2}
fb5ded39 127BuildRequires: gflags-devel
74cbdeb2 128BuildRequires: gl2ps-devel
debb38d4 129BuildRequires: glog-devel
0c2d6b7d 130%if %{with gstreamer}
158e0ccc
JB
131BuildRequires: gstreamer-devel >= 1.0
132BuildRequires: gstreamer-plugins-base-devel >= 1.0
0c2d6b7d 133%endif
901927d3 134BuildRequires: jasper-devel
b07433c6 135%{?with_java:BuildRequires: jdk}
158e0ccc 136BuildRequires: libdc1394-devel >= 2
4a401ecc 137%{?with_openmp:BuildRequires: libgomp-devel}
901927d3
AM
138BuildRequires: libjpeg-devel
139BuildRequires: libpng-devel
140BuildRequires: libraw1394-devel
0c2d6b7d 141BuildRequires: libstdc++-devel
901927d3 142BuildRequires: libtiff-devel
148338c5 143BuildRequires: libtool
d5e56e66
JB
144%if %{with unicap}
145BuildRequires: libucil-devel
146BuildRequires: libunicap-devel
147%endif
0c2d6b7d 148BuildRequires: libv4l-devel
4836bff0 149BuildRequires: ogre-devel
af6d2888 150BuildRequires: pkgconfig
701be548 151BuildRequires: protobuf-devel
158e0ccc
JB
152BuildRequires: python >= 2.0
153BuildRequires: python-devel >= 2.0
0c2d6b7d 154BuildRequires: python-numpy-devel
b221500a
JB
155BuildRequires: python3 >= 1:3.2
156BuildRequires: python3-devel >= 1:3.2
157BuildRequires: python3-numpy-devel
901927d3 158BuildRequires: rpm-pythonprov
8d499a62 159BuildRequires: rpmbuild(macros) >= 1.606
1376dffe 160BuildRequires: sed >= 4.0
158e0ccc 161BuildRequires: sphinx-pdg
996927aa 162BuildRequires: swig-python
f8e040cc 163%{?with_tbb:BuildRequires: tbb-devel}
ae3d975d
AM
164%if %{with vtk}
165BuildRequires: vtk-devel >= 5.8.0
fba97d16 166BuildRequires: vtk-java >= 5.8.0
701be548 167BuildRequires: vtk-python3-devel >= 5.8.0
ae3d975d 168%endif
901927d3 169%{?with_xine:BuildRequires: xine-lib-devel}
158e0ccc 170BuildRequires: xorg-lib-libX11-devel
452b38e1 171BuildRequires: zlib-devel
4afb606b 172%if %{with qt}
4afb606b
JB
173BuildRequires: QtCore-devel >= 4
174BuildRequires: QtGui-devel >= 4
5df3cf1b 175%{?with_opengl:BuildRequires: QtOpenGL-devel >= 4}
4afb606b
JB
176BuildRequires: qt4-qmake >= 4
177%else
178BuildRequires: gtk+2-devel >= 2.0
5df3cf1b 179%{?with_opengl:BuildRequires: gtkglext-devel >= 1.0}
4afb606b 180%endif
da5d1e09 181Requires: %{name}-core = %{epoch}:%{version}-%{release}
901927d3
AM
182BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
183
158e0ccc 184%define jver %(echo %{version} | cut -d. -f1-3 | tr -d .)
71c2eb73 185%define sover %(echo %{version} | cut -d. -f1-2)
933de752 186
901927d3
AM
187%description
188OpenCV (Open Source Computer Vision) is a library of programming
189functions mainly aimed at real time computer vision.
190
0c2d6b7d
JB
191Example applications of the OpenCV library are:
192- Human-Computer Interaction (HCI)
193- Object Identification, Segmentation and Recognition
194- Face Recognition
195- Gesture Recognition
196- Motion Tracking
197- Ego Motion, Motion Understanding
198- Structure From Motion (SFM)
199- Stereo and Multi-Camera Calibration and Depth Computation
200- Mobile Robotics.
201
202%description -l pl.UTF-8
203OpenCV (Open Source Computer Vision) to biblioteka funkcji
204przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
205
206Przykładowe zastosowania biblioteki OpenCV to
207- interakcje człowiek-komputer (HCI)
208- identyfikacja, segmentacja i rozpoznawanie obiektów
209- rozpoznawanie twarzy
210- rozpoznawanie gestów
211- śledzenie ruchu
212- rozumienie ruchu
213- SFM (Structure From Motion)
214- kalibracja dwu- i wielokamerowa, obliczanie głębi
215- robotyka ruchu.
901927d3 216
933de752
ER
217%package core
218Summary: OpenCV core libraries
da5d1e09 219Summary(pl.UTF-8): Podstawowe biblioteki OpenCV
933de752 220Group: Libraries
da5d1e09 221Conflicts: opencv < 2.4.6.2-1
933de752
ER
222
223%description core
224This package contains the OpenCV C/C++ core libraries.
225
da5d1e09
JB
226%description core -l pl.UTF-8
227Ten pakiet zawiera podstawowe biblioteki C/C++ OpenCV.
228
cf32945e
JB
229%package viz
230Summary: OpenCV viz library (VTK support)
231Summary(pl.UTF-8): Biblioteka OpenCV viz (obsługa VTK)
232Group: Libraries
233Requires: %{name} = %{epoch}:%{version}-%{release}
234
235%description viz
236OpenCV viz library (VTK support).
237
238%description viz -l pl.UTF-8
239Biblioteka OpenCV viz (obsługa VTK).
240
901927d3 241%package devel
0c2d6b7d
JB
242Summary: Header files for OpenCV library
243Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
901927d3
AM
244Group: Development/Libraries
245Requires: %{name} = %{epoch}:%{version}-%{release}
cf32945e
JB
246%if %{with vtk}
247Requires: %{name}-viz = %{epoch}:%{version}-%{release}
248%endif
0c2d6b7d 249Obsoletes: opencv-static
901927d3
AM
250
251%description devel
0c2d6b7d 252Header files for OpenCV library.
901927d3 253
0c2d6b7d
JB
254%description devel -l pl.UTF-8
255Pliki nagłówkowe biblioteki OpenCV.
901927d3 256
9141b1e2
ER
257%package doc
258Summary: Manual for OpenCV
259Summary(fr.UTF-8): Documentation pour OpenCV
260Summary(it.UTF-8): Documentazione di OpenCV
261Summary(pl.UTF-8): Podręcznik dla OpenCV
262Group: Documentation
263# noarch subpackages only when building with rpm5
9141b1e2 264BuildArch: noarch
9141b1e2
ER
265
266%description doc
267Documentation for OpenCV.
268
269%description doc -l fr.UTF-8
270Documentation pour OpenCV.
271
272%description doc -l it.UTF-8
273Documentazione di OpenCV.
274
275%description doc -l pl.UTF-8
276Dokumentacja do OpenCV.
277
200823d5
ER
278%package examples
279Summary: OpenCV code examples
280Group: Documentation
200823d5 281BuildArch: noarch
200823d5
ER
282
283%description examples
284OpenCV code examples.
285
b07433c6
JB
286%package -n java-opencv
287Summary: OpenCV Java bindings
288Summary(pl.UTF-8): Wiązania Javy do OpenCV
289Group: Libraries/Java
290Requires: %{name} = %{epoch}:%{version}-%{release}
291Requires: jre
292
293%description -n java-opencv
294OpenCV Java bindings.
295
296%description -n java-opencv -l pl.UTF-8
297Wiązania Javy do OpenCV.
298
901927d3 299%package -n python-opencv
b221500a
JB
300Summary: OpenCV Python 2 bindings
301Summary(pl.UTF-8): Wiązania Pythona 2 do OpenCV
0c2d6b7d 302Group: Libraries/Python
cd1f0136 303Requires: %{name} = %{epoch}:%{version}-%{release}
9f0b035c 304Requires: python-libs
901927d3
AM
305
306%description -n python-opencv
b221500a 307OpenCV Python 2 bindings.
901927d3 308
0c2d6b7d 309%description -n python-opencv -l pl.UTF-8
b221500a
JB
310Wiązania Pythona 2 do OpenCV.
311
312%package -n python3-opencv
313Summary: OpenCV Python 3 bindings
314Summary(pl.UTF-8): Wiązania Pythona 3 do OpenCV
315Group: Libraries/Python
316Requires: %{name} = %{epoch}:%{version}-%{release}
317Requires: python3-libs
318
319%description -n python3-opencv
320OpenCV Python 3 bindings.
321
322%description -n python3-opencv -l pl.UTF-8
323Wiązania Pythona 3 do OpenCV.
0c2d6b7d 324
901927d3 325%prep
b287af3c 326%setup -q -a1
54551f29 327
da67222a 328%undos CMakeLists.txt
54551f29 329
8a121398 330%patch0 -p1
08b22f18 331%patch1 -p1
e652d7a7 332%patch2 -p1
148338c5 333
701be548
JR
334cache_file() {
335 f="$1"
336 d="$2"
337 md5="$(md5sum "$f" | awk '{print $1}')"
338 file="$(basename "$f")"
339 mkdir -p ".cache/$d"
340 install "$f" ".cache/$d/$md5-$file"
341}
342for f in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16}; do
343 cache_file $f xfeatures2d/boostdesc
344done
345for f in %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23}; do
346 cache_file $f xfeatures2d/vgg
347done
348cache_file %{SOURCE30} data
349cache_file %{SOURCE40} ade
350
901927d3 351%build
701be548 352mkdir -p build
95daeb66 353cd build
ea26b025
ER
354
355# handle cmake & ccache
356# http://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmakec
357if [[ "%{__cc}" = *ccache* ]]; then
358 cc="%{__cc}"
359 cxx="%{__cxx}"
360 ccache="
361 -DCMAKE_C_COMPILER="ccache" -DCMAKE_C_COMPILER_ARG1="${cc#ccache }" \
362 -DCMAKE_CXX_COMPILER="ccache" -DCMAKE_CXX_COMPILER_ARG1="${cxx#ccache }" \
363 "
364fi
365
0c2d6b7d 366%cmake .. \
ea26b025 367 $ccache \
08b22f18 368 -DENABLE_PRECOMPILED_HEADERS=OFF \
09d132a9 369 -DOPENCV_LIB_INSTALL_PATH=%{_libdir} \
b287af3c 370 -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \
da5d1e09 371 -DENABLE_AVX=%{?with_avx:ON}%{!?with_avx:OFF} \
1c9fe580
JB
372 -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
373 -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \
da5d1e09
JB
374 -DENABLE_SSE3=%{?with_sse3:ON}%{!?with_sse3:OFF} \
375 -DENABLE_SSSE3=%{?with_ssse3:ON}%{!?with_ssse3:OFF} \
376 -DENABLE_SSE41=%{?with_sse41:ON}%{!?with_sse41:OFF} \
377 -DENABLE_SSE42=%{?with_sse42:ON}%{!?with_sse42:OFF} \
95daeb66 378 -DBUILD_NEW_PYTHON_SUPPORT=ON \
701be548 379 -DOPENCV_GENERATE_PKGCONFIG:BOOL=ON \
200823d5
ER
380%if %{with examples}
381 -DINSTALL_C_EXAMPLES=ON \
382 -DINSTALL_PYTHON_EXAMPLES=ON \
383%endif
b3920a9d 384 %{?with_ffmpeg:-DWITH_FFMPEG=ON} \
d5e56e66 385 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
8d5385eb 386 %{?with_opencl:-DWITH_OPENCL=ON} \
faf80a1c
JB
387 %{!?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=OFF} \
388 %{!?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=OFF} \
5df3cf1b 389 %{?with_opengl:-DWITH_OPENGL=ON} \
4a401ecc 390 %{?with_openmp:-DWITH_OPENMP=ON} \
1c9fe580 391 %{?with_openni:-DWITH_OPENNI=ON} \
809ce413 392 %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \
5df3cf1b 393 %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
f8e040cc 394 %{?with_tbb:-DWITH_TBB=ON} \
d5e56e66 395 %{?with_unicap:-DWITH_UNICAP=ON} \
ed358224 396 %{!?with_v4l:-DWITH_V4L=OFF} \
cf32945e 397 %{?with_vtk:-DWITH_VTK=ON} \
a55ba198 398 %{?with_ximea:-DWITH_XIMEA=ON} \
33a5389a
JR
399 %{?with_xine:-DWITH_XINE=ON} \
400 -DWITH_IPP=OFF
54551f29 401
8b9f61f7 402%{__make}
901927d3
AM
403
404%install
405rm -rf $RPM_BUILD_ROOT
95daeb66 406%{__make} -C build install \
901927d3
AM
407 DESTDIR=$RPM_BUILD_ROOT
408
200823d5
ER
409%if %{with examples}
410install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
701be548 411mv $RPM_BUILD_ROOT%{_datadir}/opencv4/samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
200823d5 412%endif
9141b1e2 413
7545129b 414# disable completeness check incompatible with split packaging
701be548 415%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d' $RPM_BUILD_ROOT%{_libdir}/cmake/opencv4/OpenCVModules.cmake
7545129b 416
8d499a62
JB
417%py_comp $RPM_BUILD_ROOT%{py_sitedir}
418%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
419%py_postclean
420
b07433c6
JB
421%if %{with java}
422# move to proper directories, create symlink
423install -d $RPM_BUILD_ROOT%{_javadir}
701be548
JR
424%{__mv} $RPM_BUILD_ROOT%{_javadir}/opencv4/libopencv_java*.so $RPM_BUILD_ROOT%{_libdir}
425sed -i -e 's#/share/java/opencv4/libopencv_java%{jver}\.so#/%{_lib}/libopencv_java%{jver}.so#g' \
426 $RPM_BUILD_ROOT%{_libdir}/cmake/opencv4/OpenCVModules-pld.cmake
427%{__mv} $RPM_BUILD_ROOT%{_javadir}/opencv4/opencv-*.jar $RPM_BUILD_ROOT%{_javadir}
428rmdir $RPM_BUILD_ROOT%{_javadir}/opencv4
b07433c6
JB
429ln -sf $(basename $RPM_BUILD_ROOT%{_javadir}/opencv-*.jar) $RPM_BUILD_ROOT%{_javadir}/opencv.jar
430%endif
431
901927d3
AM
432%clean
433rm -rf $RPM_BUILD_ROOT
434
435%post -p /sbin/ldconfig
436%postun -p /sbin/ldconfig
437
933de752
ER
438%post core -p /sbin/ldconfig
439%postun core -p /sbin/ldconfig
440
485d5dca
JB
441%post viz -p /sbin/ldconfig
442%postun viz -p /sbin/ldconfig
443
b07433c6
JB
444%post -n java-opencv -p /sbin/ldconfig
445%postun -n java-opencv -p /sbin/ldconfig
446
901927d3
AM
447%files
448%defattr(644,root,root,755)
f753ced4 449%attr(755,root,root) %{_bindir}/opencv_annotation
701be548 450#%attr(755,root,root) %{_bindir}/opencv_createsamples
09d132a9 451%attr(755,root,root) %{_bindir}/opencv_interactive-calibration
701be548 452#%attr(755,root,root) %{_bindir}/opencv_traincascade
09d132a9
ER
453%attr(755,root,root) %{_bindir}/opencv_version
454%attr(755,root,root) %{_bindir}/opencv_visualisation
701be548 455%attr(755,root,root) %{_bindir}/setup_vars_opencv4.sh
158e0ccc 456%attr(755,root,root) %{_libdir}/libopencv_calib3d.so.*.*.*
71c2eb73 457%attr(755,root,root) %ghost %{_libdir}/libopencv_calib3d.so.%{sover}
158e0ccc 458%attr(755,root,root) %{_libdir}/libopencv_features2d.so.*.*.*
71c2eb73 459%attr(755,root,root) %ghost %{_libdir}/libopencv_features2d.so.%{sover}
158e0ccc 460%attr(755,root,root) %{_libdir}/libopencv_highgui.so.*.*.*
71c2eb73 461%attr(755,root,root) %ghost %{_libdir}/libopencv_highgui.so.%{sover}
158e0ccc 462%attr(755,root,root) %{_libdir}/libopencv_objdetect.so.*.*.*
71c2eb73 463%attr(755,root,root) %ghost %{_libdir}/libopencv_objdetect.so.%{sover}
158e0ccc 464%attr(755,root,root) %{_libdir}/libopencv_stitching.so.*.*.*
71c2eb73 465%attr(755,root,root) %ghost %{_libdir}/libopencv_stitching.so.%{sover}
158e0ccc 466%attr(755,root,root) %{_libdir}/libopencv_superres.so.*.*.*
71c2eb73 467%attr(755,root,root) %ghost %{_libdir}/libopencv_superres.so.%{sover}
158e0ccc 468%attr(755,root,root) %{_libdir}/libopencv_videostab.so.*.*.*
71c2eb73 469%attr(755,root,root) %ghost %{_libdir}/libopencv_videostab.so.%{sover}
b287af3c
JR
470# contrib modules
471%attr(755,root,root) %{_bindir}/opencv_waldboost_detector
472%attr(755,root,root) %ghost %{_libdir}/libopencv_aruco.so.%{sover}
473%attr(755,root,root) %{_libdir}/libopencv_aruco.so.*.*.*
474%attr(755,root,root) %ghost %{_libdir}/libopencv_bgsegm.so.%{sover}
475%attr(755,root,root) %{_libdir}/libopencv_bgsegm.so.*.*.*
476%attr(755,root,root) %ghost %{_libdir}/libopencv_bioinspired.so.%{sover}
477%attr(755,root,root) %{_libdir}/libopencv_bioinspired.so.*.*.*
478%attr(755,root,root) %ghost %{_libdir}/libopencv_ccalib.so.%{sover}
479%attr(755,root,root) %{_libdir}/libopencv_ccalib.so.*.*.*
480%attr(755,root,root) %ghost %{_libdir}/libopencv_datasets.so.%{sover}
481%attr(755,root,root) %{_libdir}/libopencv_datasets.so.*.*.*
482%attr(755,root,root) %ghost %{_libdir}/libopencv_dnn.so.%{sover}
483%attr(755,root,root) %{_libdir}/libopencv_dnn.so.*.*.*
c9cb1c24
JR
484%attr(755,root,root) %ghost %{_libdir}/libopencv_dnn_objdetect.so.%{sover}
485%attr(755,root,root) %{_libdir}/libopencv_dnn_objdetect.so.*.*.*
b287af3c
JR
486%attr(755,root,root) %ghost %{_libdir}/libopencv_dpm.so.%{sover}
487%attr(755,root,root) %{_libdir}/libopencv_dpm.so.*.*.*
488%attr(755,root,root) %ghost %{_libdir}/libopencv_face.so.%{sover}
489%attr(755,root,root) %{_libdir}/libopencv_face.so.*.*.*
09d132a9
ER
490%attr(755,root,root) %ghost %{_libdir}/libopencv_freetype.so.%{sover}
491%attr(755,root,root) %{_libdir}/libopencv_freetype.so.*.*.*
b287af3c
JR
492%attr(755,root,root) %ghost %{_libdir}/libopencv_fuzzy.so.%{sover}
493%attr(755,root,root) %{_libdir}/libopencv_fuzzy.so.*.*.*
494%attr(755,root,root) %ghost %{_libdir}/libopencv_hdf.so.%{sover}
495%attr(755,root,root) %{_libdir}/libopencv_hdf.so.*.*.*
c9cb1c24
JR
496%attr(755,root,root) %ghost %{_libdir}/libopencv_hfs.so.%{sover}
497%attr(755,root,root) %{_libdir}/libopencv_hfs.so.*.*.*
09d132a9
ER
498%attr(755,root,root) %ghost %{_libdir}/libopencv_img_hash.so.%{sover}
499%attr(755,root,root) %{_libdir}/libopencv_img_hash.so.*.*.*
b287af3c
JR
500%attr(755,root,root) %ghost %{_libdir}/libopencv_line_descriptor.so.%{sover}
501%attr(755,root,root) %{_libdir}/libopencv_line_descriptor.so.*.*.*
3752412b
JR
502%attr(755,root,root) %ghost %{_libdir}/libopencv_ovis.so.%{sover}
503%attr(755,root,root) %{_libdir}/libopencv_ovis.so.*.*.*
b287af3c
JR
504%attr(755,root,root) %ghost %{_libdir}/libopencv_optflow.so.%{sover}
505%attr(755,root,root) %{_libdir}/libopencv_optflow.so.*.*.*
09d132a9
ER
506%attr(755,root,root) %ghost %{_libdir}/libopencv_phase_unwrapping.so.%{sover}
507%attr(755,root,root) %{_libdir}/libopencv_phase_unwrapping.so.*.*.*
b287af3c
JR
508%attr(755,root,root) %ghost %{_libdir}/libopencv_plot.so.%{sover}
509%attr(755,root,root) %{_libdir}/libopencv_plot.so.*.*.*
510%attr(755,root,root) %ghost %{_libdir}/libopencv_reg.so.%{sover}
511%attr(755,root,root) %{_libdir}/libopencv_reg.so.*.*.*
512%attr(755,root,root) %ghost %{_libdir}/libopencv_rgbd.so.%{sover}
513%attr(755,root,root) %{_libdir}/libopencv_rgbd.so.*.*.*
514%attr(755,root,root) %ghost %{_libdir}/libopencv_saliency.so.%{sover}
515%attr(755,root,root) %{_libdir}/libopencv_saliency.so.*.*.*
516%attr(755,root,root) %ghost %{_libdir}/libopencv_sfm.so.%{sover}
517%attr(755,root,root) %{_libdir}/libopencv_sfm.so.*.*.*
518%attr(755,root,root) %ghost %{_libdir}/libopencv_stereo.so.%{sover}
519%attr(755,root,root) %{_libdir}/libopencv_stereo.so.*.*.*
520%attr(755,root,root) %ghost %{_libdir}/libopencv_structured_light.so.%{sover}
521%attr(755,root,root) %{_libdir}/libopencv_structured_light.so.*.*.*
522%attr(755,root,root) %ghost %{_libdir}/libopencv_surface_matching.so.%{sover}
523%attr(755,root,root) %{_libdir}/libopencv_surface_matching.so.*.*.*
524%attr(755,root,root) %ghost %{_libdir}/libopencv_text.so.%{sover}
525%attr(755,root,root) %{_libdir}/libopencv_text.so.*.*.*
526%attr(755,root,root) %ghost %{_libdir}/libopencv_tracking.so.%{sover}
527%attr(755,root,root) %{_libdir}/libopencv_tracking.so.*.*.*
528%attr(755,root,root) %ghost %{_libdir}/libopencv_xfeatures2d.so.%{sover}
529%attr(755,root,root) %{_libdir}/libopencv_xfeatures2d.so.*.*.*
530%attr(755,root,root) %ghost %{_libdir}/libopencv_ximgproc.so.%{sover}
531%attr(755,root,root) %{_libdir}/libopencv_ximgproc.so.*.*.*
532%attr(755,root,root) %ghost %{_libdir}/libopencv_xobjdetect.so.%{sover}
533%attr(755,root,root) %{_libdir}/libopencv_xobjdetect.so.*.*.*
534%attr(755,root,root) %ghost %{_libdir}/libopencv_xphoto.so.%{sover}
535%attr(755,root,root) %{_libdir}/libopencv_xphoto.so.*.*.*
701be548
JR
536%attr(755,root,root) %ghost %{_libdir}/libopencv_alphamat.so.%{sover}
537%attr(755,root,root) %{_libdir}/libopencv_alphamat.so.*.*.*
538%attr(755,root,root) %ghost %{_libdir}/libopencv_dnn_superres.so.%{sover}
539%attr(755,root,root) %{_libdir}/libopencv_dnn_superres.so.*.*.*
540%attr(755,root,root) %ghost %{_libdir}/libopencv_gapi.so.%{sover}
541%attr(755,root,root) %{_libdir}/libopencv_gapi.so.*.*.*
542%attr(755,root,root) %ghost %{_libdir}/libopencv_intensity_transform.so.%{sover}
543%attr(755,root,root) %{_libdir}/libopencv_intensity_transform.so.*.*.*
544%attr(755,root,root) %ghost %{_libdir}/libopencv_mcc.so.%{sover}
545%attr(755,root,root) %{_libdir}/libopencv_mcc.so.*.*.*
546%attr(755,root,root) %ghost %{_libdir}/libopencv_quality.so.%{sover}
547%attr(755,root,root) %{_libdir}/libopencv_quality.so.*.*.*
548%attr(755,root,root) %ghost %{_libdir}/libopencv_rapid.so.%{sover}
549%attr(755,root,root) %{_libdir}/libopencv_rapid.so.*.*.*
550
551%dir %{_datadir}/opencv4
552%{_datadir}/opencv4/haarcascades
553%{_datadir}/opencv4/lbpcascades
554%{_datadir}/opencv4/quality
901927d3 555
933de752
ER
556%files core
557%defattr(644,root,root,755)
158e0ccc 558%attr(755,root,root) %{_libdir}/libopencv_core.so.*.*.*
71c2eb73 559%attr(755,root,root) %ghost %{_libdir}/libopencv_core.so.%{sover}
158e0ccc 560%attr(755,root,root) %{_libdir}/libopencv_flann.so.*.*.*
71c2eb73 561%attr(755,root,root) %ghost %{_libdir}/libopencv_flann.so.%{sover}
158e0ccc 562%attr(755,root,root) %{_libdir}/libopencv_imgproc.so.*.*.*
71c2eb73 563%attr(755,root,root) %ghost %{_libdir}/libopencv_imgproc.so.%{sover}
158e0ccc 564%attr(755,root,root) %{_libdir}/libopencv_ml.so.*.*.*
71c2eb73 565%attr(755,root,root) %ghost %{_libdir}/libopencv_ml.so.%{sover}
158e0ccc 566%attr(755,root,root) %{_libdir}/libopencv_photo.so.*.*.*
71c2eb73 567%attr(755,root,root) %ghost %{_libdir}/libopencv_photo.so.%{sover}
158e0ccc 568%attr(755,root,root) %{_libdir}/libopencv_video.so.*.*.*
71c2eb73 569%attr(755,root,root) %ghost %{_libdir}/libopencv_video.so.%{sover}
33a5389a 570%attr(755,root,root) %{_libdir}/libopencv_imgcodecs.so.*.*.*
71c2eb73 571%attr(755,root,root) %ghost %{_libdir}/libopencv_imgcodecs.so.%{sover}
33a5389a 572%attr(755,root,root) %{_libdir}/libopencv_shape.so.*.*.*
71c2eb73 573%attr(755,root,root) %ghost %{_libdir}/libopencv_shape.so.%{sover}
33a5389a 574%attr(755,root,root) %{_libdir}/libopencv_videoio.so.*.*.*
71c2eb73 575%attr(755,root,root) %ghost %{_libdir}/libopencv_videoio.so.%{sover}
cf32945e
JB
576
577%if %{with vtk}
578%files viz
579%defattr(644,root,root,755)
158e0ccc 580%attr(755,root,root) %{_libdir}/libopencv_viz.so.*.*.*
71c2eb73 581%attr(755,root,root) %ghost %{_libdir}/libopencv_viz.so.%{sover}
cf32945e 582%endif
933de752 583
901927d3
AM
584%files devel
585%defattr(644,root,root,755)
cf32945e 586# core
701be548
JR
587%{_libdir}/libopencv_core.so
588%{_libdir}/libopencv_flann.so
589%{_libdir}/libopencv_imgproc.so
590%{_libdir}/libopencv_ml.so
591%{_libdir}/libopencv_photo.so
592%{_libdir}/libopencv_video.so
cf32945e 593# GUI/extensions (base package)
701be548
JR
594%{_libdir}/libopencv_calib3d.so
595%{_libdir}/libopencv_features2d.so
596%{_libdir}/libopencv_highgui.so
597%{_libdir}/libopencv_objdetect.so
598%{_libdir}/libopencv_stitching.so
599%{_libdir}/libopencv_superres.so
600%{_libdir}/libopencv_videostab.so
601%{_libdir}/libopencv_imgcodecs.so
602%{_libdir}/libopencv_shape.so
603%{_libdir}/libopencv_videoio.so
b287af3c 604# contrib
701be548
JR
605%{_libdir}/libopencv_aruco.so
606%{_libdir}/libopencv_bgsegm.so
607%{_libdir}/libopencv_bioinspired.so
608%{_libdir}/libopencv_ccalib.so
609%{_libdir}/libopencv_datasets.so
610%{_libdir}/libopencv_dnn.so
611%{_libdir}/libopencv_dnn_objdetect.so
612%{_libdir}/libopencv_dpm.so
613%{_libdir}/libopencv_face.so
614%{_libdir}/libopencv_freetype.so
615%{_libdir}/libopencv_fuzzy.so
616%{_libdir}/libopencv_hdf.so
617%{_libdir}/libopencv_hfs.so
618%{_libdir}/libopencv_img_hash.so
619%{_libdir}/libopencv_line_descriptor.so
620%{_libdir}/libopencv_optflow.so
621%{_libdir}/libopencv_ovis.so
622%{_libdir}/libopencv_phase_unwrapping.so
623%{_libdir}/libopencv_plot.so
624%{_libdir}/libopencv_reg.so
625%{_libdir}/libopencv_rgbd.so
626%{_libdir}/libopencv_saliency.so
627%{_libdir}/libopencv_sfm.so
628%{_libdir}/libopencv_stereo.so
629%{_libdir}/libopencv_structured_light.so
630%{_libdir}/libopencv_surface_matching.so
631%{_libdir}/libopencv_text.so
632%{_libdir}/libopencv_tracking.so
633%{_libdir}/libopencv_xfeatures2d.so
634%{_libdir}/libopencv_ximgproc.so
635%{_libdir}/libopencv_xobjdetect.so
636%{_libdir}/libopencv_xphoto.so
637%{_libdir}/libopencv_alphamat.so
638%{_libdir}/libopencv_dnn_superres.so
639%{_libdir}/libopencv_gapi.so
640%{_libdir}/libopencv_intensity_transform.so
641%{_libdir}/libopencv_mcc.so
642%{_libdir}/libopencv_quality.so
643%{_libdir}/libopencv_rapid.so
cf32945e
JB
644# viz
645%if %{with vtk}
701be548 646%{_libdir}/libopencv_viz.so
0e077f8d 647%endif
701be548 648%{_includedir}/opencv4
e652d7a7 649%dir %{_libdir}/cmake/opencv4
701be548
JR
650%{_libdir}/cmake/opencv4/OpenCV*.cmake
651%{_pkgconfigdir}/opencv4.pc
901927d3 652
9141b1e2
ER
653%files doc
654%defattr(644,root,root,755)
655# TODO: probably could rebuild them and package via make install
656%doc doc/*
657
200823d5
ER
658%if %{with examples}
659%files examples
660%defattr(644,root,root,755)
661%{_examplesdir}/%{name}-%{version}
662%endif
663
b07433c6
JB
664%if %{with java}
665%files -n java-opencv
666%defattr(644,root,root,755)
835e0cdd
ER
667%attr(755,root,root) %{_libdir}/libopencv_java%{jver}.so
668%{_javadir}/opencv-%{jver}.jar
b07433c6
JB
669%{_javadir}/opencv.jar
670%endif
671
901927d3
AM
672%files -n python-opencv
673%defattr(644,root,root,755)
fe201543
JR
674%dir %{py_sitedir}/cv2
675%dir %{py_sitedir}/cv2/python-*
676%attr(755,root,root) %{py_sitedir}/cv2/python-*/cv2.so
677%{py_sitedir}/cv2/*.py[co]
b221500a
JB
678
679%files -n python3-opencv
680%defattr(644,root,root,755)
fe201543
JR
681%dir %{py3_sitedir}/cv2
682%dir %{py3_sitedir}/cv2/python-*
683%attr(755,root,root) %{py3_sitedir}/cv2/python-*/cv2.cpython-*.so
684%{py3_sitedir}/cv2/*.py
This page took 0.190416 seconds and 4 git commands to generate.