3 # - CUDA support (on bcond)
7 %bcond_with tbb # Threading Building Blocks support (everywhere)
8 %bcond_with sse # use SSE instructions
9 %bcond_with sse2 # use SSE2 instructions
11 %bcond_without gstreamer # GStreamer support in highgui
12 %bcond_with openni # OpenNI (Natural Interaction) support in highgui
13 %bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary)
14 %bcond_with qt # Qt backend instead of GTK+ in highgui
15 %bcond_with unicap # Unicap support in highgui (GPL)
16 %bcond_with v4l # Video4Linux in highgui (even V4L2 support currently relies on V4L1 API)
17 %bcond_with ximea # m3API (XIMEA cameras) support in highgui (proprietary)
18 %bcond_with xine # XINE support in highgui (GPL)
20 %ifarch pentium3 pentium4 %{x8664}
23 %ifarch pentium4 %{x8664}
26 Summary: A library of programming functions mainly aimed at real time computer vision
27 Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
32 %if %{with unicap} || %{with xine}
33 License: GPL (enforced by used libraries), BSD (opencv itself)
38 Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}a.tar.bz2
39 # Source0-md5: 82e4b6bfa349777233eea09b075e931e
40 Patch0: %{name}-cflags.patch
41 Patch1: %{name}-link.patch
42 Patch2: %{name}-unicap-c++.patch
43 Patch3: %{name}-c.patch
44 Patch4: %{name}-gcc.patch
45 Patch5: %{name}-multilib.patch
46 Patch6: %{name}-ximea-linux.patch
47 URL: http://opencv.willowgarage.com/
48 %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
49 BuildRequires: OpenEXR-devel
50 # as of OpenCV 2.3.1 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
51 %{?with_openni:BuildRequires: OpenNI-devel}
52 %{?with_ximea:BuildRequires: XIMEA-devel}
53 BuildRequires: cmake >= 2.4
54 BuildRequires: doxygen
55 BuildRequires: eigen >= 2
56 BuildRequires: ffmpeg-devel >= 0.7
58 BuildRequires: gstreamer-devel >= 0.10
59 BuildRequires: gstreamer-plugins-base-devel >= 0.10
61 BuildRequires: jasper-devel
62 BuildRequires: libdc1394-devel
63 BuildRequires: libjpeg-devel
64 BuildRequires: libpng-devel
65 BuildRequires: libraw1394-devel
66 BuildRequires: libstdc++-devel
67 BuildRequires: libtiff-devel
68 BuildRequires: libtool
70 BuildRequires: libucil-devel
71 BuildRequires: libunicap-devel
73 BuildRequires: libv4l-devel
74 BuildRequires: pkgconfig
75 BuildRequires: python-devel
76 BuildRequires: python-numpy-devel
77 BuildRequires: rpm-pythonprov
78 BuildRequires: rpmbuild(macros) >= 1.606
79 BuildRequires: sed >= 4.0
80 BuildRequires: swig-python
81 %{?with_tbb:BuildRequires: tbb-devel}
82 %{?with_xine:BuildRequires: xine-lib-devel}
83 BuildRequires: zlib-devel
85 BuildRequires: OpenGL-devel
86 BuildRequires: QtCore-devel >= 4
87 BuildRequires: QtGui-devel >= 4
88 BuildRequires: QtOpenGL-devel >= 4
89 BuildRequires: qt4-qmake >= 4
91 BuildRequires: gtk+2-devel >= 2.0
93 # ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
94 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 OpenCV (Open Source Computer Vision) is a library of programming
98 functions mainly aimed at real time computer vision.
100 Example applications of the OpenCV library are:
101 - Human-Computer Interaction (HCI)
102 - Object Identification, Segmentation and Recognition
104 - Gesture Recognition
106 - Ego Motion, Motion Understanding
107 - Structure From Motion (SFM)
108 - Stereo and Multi-Camera Calibration and Depth Computation
111 %description -l pl.UTF-8
112 OpenCV (Open Source Computer Vision) to biblioteka funkcji
113 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
115 Przykładowe zastosowania biblioteki OpenCV to
116 - interakcje człowiek-komputer (HCI)
117 - identyfikacja, segmentacja i rozpoznawanie obiektów
118 - rozpoznawanie twarzy
119 - rozpoznawanie gestów
122 - SFM (Structure From Motion)
123 - kalibracja dwu- i wielokamerowa, obliczanie głębi
127 Summary: Header files for OpenCV library
128 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
129 Group: Development/Libraries
130 Requires: %{name} = %{epoch}:%{version}-%{release}
131 Obsoletes: opencv-static
134 Header files for OpenCV library.
136 %description devel -l pl.UTF-8
137 Pliki nagłówkowe biblioteki OpenCV.
139 %package -n python-opencv
140 Summary: OpenCV Python bindings
141 Summary(pl.UTF-8): Wiązania Pythona do OpenCV
142 Group: Libraries/Python
143 Requires: %{name} = %{epoch}:%{version}-%{release}
144 %pyrequires_eq python-libs
146 %description -n python-opencv
147 OpenCV Python bindings.
149 %description -n python-opencv -l pl.UTF-8
150 Wiązania Pythona do OpenCV.
153 %setup -q -n OpenCV-%{version}
155 %undos CMakeLists.txt
156 %undos modules/gpu/CMakeLists.txt
170 -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
171 -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \
172 -DBUILD_NEW_PYTHON_SUPPORT=ON \
174 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
175 %{?with_openni:-DWITH_OPENNI=ON} \
176 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
177 %{?with_qt:-DWITH_QT=ON -DWITH_QT_OPENGL=ON -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
178 %{?with_tbb:-DWITH_TBB=ON} \
179 %{?with_unicap:-DWITH_UNICAP=ON} \
180 %{!?with_v4l:-DWITH_V4L=OFF} \
181 %{?with_ximea:-DWITH_XIMEA=ON} \
182 %{?with_xine:-DWITH_XINE=ON}
187 rm -rf $RPM_BUILD_ROOT
189 %{__make} -C build install \
190 DESTDIR=$RPM_BUILD_ROOT
192 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
193 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
195 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
196 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
200 rm -rf $RPM_BUILD_ROOT
202 %post -p /sbin/ldconfig
203 %postun -p /sbin/ldconfig
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_bindir}/opencv_*
208 %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.3
210 %dir %{_datadir}/OpenCV
211 %doc %{_datadir}/OpenCV/doc
212 %{_datadir}/OpenCV/haarcascades
213 %{_datadir}/OpenCV/lbpcascades
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_libdir}/libopencv_*.so
218 %{_includedir}/opencv
219 %{_includedir}/opencv2
220 %{_datadir}/OpenCV/OpenCVConfig*.cmake
221 %{_pkgconfigdir}/opencv.pc
223 %files -n python-opencv
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{py_sitedir}/cv2.so
226 %{py_sitedir}/cv.py[co]