3 # - CUDA support (on bcond)
4 # - OpenNI (http://openni.org/) + PrimeSensor module
5 # - XIMEA? cmake file seems to be Win32-specific, but ximea.com has some Linux package
8 %bcond_without gstreamer # GStreamer support
9 %bcond_with pvapi # PvAPI (AVT GigE cameras) support
10 %bcond_with qt # Qt backend instead of GTK+
11 %bcond_with tbb # Threading Building Blocks support
12 %bcond_with unicap # Unicap support (GPL)
13 %bcond_with v4l # Video4Linux (even V4L2 support currently relies on V4L1 API)
14 %bcond_with xine # XINE support (GPL)
16 Summary: A library of programming functions mainly aimed at real time computer vision
17 Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
22 %if %{with unicap} || %{with xine}
23 License: GPL (enforced by used libraries), BSD (opencv itself)
28 Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}a.tar.bz2
29 # Source0-md5: 82e4b6bfa349777233eea09b075e931e
30 Patch0: %{name}-cflags.patch
31 Patch1: %{name}-link.patch
32 Patch2: %{name}-unicap-c++.patch
33 Patch3: %{name}-c.patch
34 Patch4: %{name}-gcc.patch
35 Patch5: %{name}-multilib.patch
36 URL: http://opencv.willowgarage.com/
37 %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
38 BuildRequires: OpenEXR-devel
39 BuildRequires: cmake >= 2.4
40 BuildRequires: doxygen
41 BuildRequires: eigen >= 2
42 BuildRequires: ffmpeg-devel >= 0.7
44 BuildRequires: gstreamer-devel >= 0.10
45 BuildRequires: gstreamer-plugins-base-devel >= 0.10
47 BuildRequires: jasper-devel
48 BuildRequires: libdc1394-devel
49 BuildRequires: libjpeg-devel
50 BuildRequires: libpng-devel
51 BuildRequires: libraw1394-devel
52 BuildRequires: libstdc++-devel
53 BuildRequires: libtiff-devel
54 BuildRequires: libtool
56 BuildRequires: libucil-devel
57 BuildRequires: libunicap-devel
59 BuildRequires: libv4l-devel
60 BuildRequires: pkgconfig
61 BuildRequires: python-devel
62 BuildRequires: python-numpy-devel
63 BuildRequires: rpm-pythonprov
64 BuildRequires: rpmbuild(macros) >= 1.606
65 BuildRequires: sed >= 4.0
66 BuildRequires: swig-python
67 %{?with_tbb:BuildRequires: tbb-devel}
68 %{?with_xine:BuildRequires: xine-lib-devel}
69 BuildRequires: zlib-devel
71 BuildRequires: OpenGL-devel
72 BuildRequires: QtCore-devel >= 4
73 BuildRequires: QtGui-devel >= 4
74 BuildRequires: QtOpenGL-devel >= 4
75 BuildRequires: qt4-qmake >= 4
77 BuildRequires: gtk+2-devel >= 2.0
79 # ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
80 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
83 OpenCV (Open Source Computer Vision) is a library of programming
84 functions mainly aimed at real time computer vision.
86 Example applications of the OpenCV library are:
87 - Human-Computer Interaction (HCI)
88 - Object Identification, Segmentation and Recognition
92 - Ego Motion, Motion Understanding
93 - Structure From Motion (SFM)
94 - Stereo and Multi-Camera Calibration and Depth Computation
97 %description -l pl.UTF-8
98 OpenCV (Open Source Computer Vision) to biblioteka funkcji
99 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
101 Przykładowe zastosowania biblioteki OpenCV to
102 - interakcje człowiek-komputer (HCI)
103 - identyfikacja, segmentacja i rozpoznawanie obiektów
104 - rozpoznawanie twarzy
105 - rozpoznawanie gestów
108 - SFM (Structure From Motion)
109 - kalibracja dwu- i wielokamerowa, obliczanie głębi
113 Summary: Header files for OpenCV library
114 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
115 Group: Development/Libraries
116 Requires: %{name} = %{epoch}:%{version}-%{release}
117 Obsoletes: opencv-static
120 Header files for OpenCV library.
122 %description devel -l pl.UTF-8
123 Pliki nagłówkowe biblioteki OpenCV.
125 %package -n python-opencv
126 Summary: OpenCV Python bindings
127 Summary(pl.UTF-8): Wiązania Pythona do OpenCV
128 Group: Libraries/Python
129 Requires: %{name} = %{epoch}:%{version}-%{release}
130 %pyrequires_eq python-libs
132 %description -n python-opencv
133 OpenCV Python bindings.
135 %description -n python-opencv -l pl.UTF-8
136 Wiązania Pythona do OpenCV.
139 %setup -q -n OpenCV-%{version}
141 %undos CMakeLists.txt
142 %undos modules/gpu/CMakeLists.txt
155 %ifarch pentium4 %{x8664}
162 -DBUILD_NEW_PYTHON_SUPPORT=ON \
164 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
165 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
166 %{?with_qt:-DWITH_QT=ON -DWITH_QT_OPENGL=ON -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
167 %{?with_tbb:-DWITH_TBB=ON} \
168 %{?with_unicap:-DWITH_UNICAP=ON} \
169 %{!?with_v4l:-DWITH_V4L=OFF} \
170 %{?with_xine:-DWITH_XINE=ON}
175 rm -rf $RPM_BUILD_ROOT
177 %{__make} -C build install \
178 DESTDIR=$RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
181 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
183 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
184 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
188 rm -rf $RPM_BUILD_ROOT
190 %post -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_bindir}/opencv_*
196 %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
197 %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.3
198 %dir %{_datadir}/OpenCV
199 %doc %{_datadir}/OpenCV/doc
200 %{_datadir}/OpenCV/haarcascades
201 %{_datadir}/OpenCV/lbpcascades
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libdir}/libopencv_*.so
206 %{_includedir}/opencv
207 %{_includedir}/opencv2
208 %{_datadir}/OpenCV/OpenCVConfig*.cmake
209 %{_pkgconfigdir}/opencv.pc
211 %files -n python-opencv
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{py_sitedir}/cv2.so
214 %{py_sitedir}/cv.py[co]