2 # TODO: - CUDA support (on bcond)
3 # - consider name change to OpenCV
6 %bcond_without gstreamer # GStreamer support
7 %bcond_with pvapi # PvAPI (AVT GigE cameras) support
8 %bcond_with qt # Qt backend instead of GTK+
9 %bcond_with tbb # Threading Building Blocks support
10 %bcond_with unicap # Unicap support (GPL)
11 %bcond_with v4l # Video4Linux (even V4L2 support currently relies on V4L1 API)
12 %bcond_with xine # XINE support (GPL)
14 Summary: A library of programming functions mainly aimed at real time computer vision
15 Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
20 %if %{with unicap} || %{with xine}
21 License: GPL (enforced by used libraries), BSD (opencv itself)
26 Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}a.tar.bz2
27 # Source0-md5: 82e4b6bfa349777233eea09b075e931e
28 Patch0: %{name}-cflags.patch
29 Patch1: %{name}-link.patch
30 Patch2: %{name}-unicap-c++.patch
31 Patch3: %{name}-c.patch
32 Patch4: %{name}-gcc.patch
33 Patch5: %{name}-multilib.patch
34 URL: http://opencv.willowgarage.com/
35 %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
36 BuildRequires: OpenEXR-devel
37 BuildRequires: cmake >= 2.4
38 BuildRequires: doxygen
39 BuildRequires: eigen >= 2
40 BuildRequires: ffmpeg-devel >= 0.7
42 BuildRequires: gstreamer-devel >= 0.10
43 BuildRequires: gstreamer-plugins-base-devel >= 0.10
45 BuildRequires: jasper-devel
46 BuildRequires: libdc1394-devel
47 BuildRequires: libjpeg-devel
48 BuildRequires: libpng-devel
49 BuildRequires: libraw1394-devel
50 BuildRequires: libstdc++-devel
51 BuildRequires: libtiff-devel
52 BuildRequires: libtool
54 BuildRequires: libucil-devel
55 BuildRequires: libunicap-devel
57 BuildRequires: libv4l-devel
58 BuildRequires: pkgconfig
59 BuildRequires: python-devel
60 BuildRequires: python-numpy-devel
61 BuildRequires: rpm-pythonprov
62 BuildRequires: rpmbuild(macros) >= 1.600
63 BuildRequires: sed >= 4.0
64 BuildRequires: swig-python
65 %{?with_tbb:BuildRequires: tbb-devel}
66 %{?with_xine:BuildRequires: xine-lib-devel}
67 BuildRequires: zlib-devel
69 BuildRequires: OpenGL-devel
70 BuildRequires: QtCore-devel >= 4
71 BuildRequires: QtGui-devel >= 4
72 BuildRequires: QtOpenGL-devel >= 4
73 BuildRequires: qt4-qmake >= 4
75 BuildRequires: gtk+2-devel >= 2.0
77 # ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
78 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 OpenCV (Open Source Computer Vision) is a library of programming
82 functions mainly aimed at real time computer vision.
84 Example applications of the OpenCV library are:
85 - Human-Computer Interaction (HCI)
86 - Object Identification, Segmentation and Recognition
90 - Ego Motion, Motion Understanding
91 - Structure From Motion (SFM)
92 - Stereo and Multi-Camera Calibration and Depth Computation
95 %description -l pl.UTF-8
96 OpenCV (Open Source Computer Vision) to biblioteka funkcji
97 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
99 Przykładowe zastosowania biblioteki OpenCV to
100 - interakcje człowiek-komputer (HCI)
101 - identyfikacja, segmentacja i rozpoznawanie obiektów
102 - rozpoznawanie twarzy
103 - rozpoznawanie gestów
106 - SFM (Structure From Motion)
107 - kalibracja dwu- i wielokamerowa, obliczanie głębi
111 Summary: Header files for OpenCV library
112 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
113 Group: Development/Libraries
114 Requires: %{name} = %{epoch}:%{version}-%{release}
115 Obsoletes: opencv-static
118 Header files for OpenCV library.
120 %description devel -l pl.UTF-8
121 Pliki nagłówkowe biblioteki OpenCV.
123 %package -n python-opencv
124 Summary: OpenCV Python bindings
125 Summary(pl.UTF-8): Wiązania Pythona do OpenCV
126 Group: Libraries/Python
127 Requires: %{name} = %{epoch}:%{version}-%{release}
128 %pyrequires_eq python-libs
130 %description -n python-opencv
131 OpenCV Python bindings.
133 %description -n python-opencv -l pl.UTF-8
134 Wiązania Pythona do OpenCV.
137 %setup -q -n OpenCV-%{version}
139 %undos CMakeLists.txt
140 %undos modules/gpu/CMakeLists.txt
153 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
154 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
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}
184 rm -rf $RPM_BUILD_ROOT
186 %post -p /sbin/ldconfig
187 %postun -p /sbin/ldconfig
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_bindir}/opencv_*
192 %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
193 %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.3
194 %dir %{_datadir}/OpenCV
195 %doc %{_datadir}/OpenCV/doc
196 %{_datadir}/OpenCV/haarcascades
197 %{_datadir}/OpenCV/lbpcascades
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/libopencv_*.so
202 %{_includedir}/opencv
203 %{_includedir}/opencv2
204 %{_datadir}/OpenCV/OpenCVConfig*.cmake
205 %{_pkgconfigdir}/opencv.pc
207 %files -n python-opencv
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{py_sitedir}/cv2.so