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 URL: http://opencv.willowgarage.com/
34 %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
35 BuildRequires: OpenEXR-devel
36 BuildRequires: cmake >= 2.4
37 BuildRequires: doxygen
38 BuildRequires: eigen >= 2
39 BuildRequires: ffmpeg-devel >= 0.7
41 BuildRequires: gstreamer-devel >= 0.10
42 BuildRequires: gstreamer-plugins-base-devel >= 0.10
44 BuildRequires: jasper-devel
45 BuildRequires: libdc1394-devel
46 BuildRequires: libjpeg-devel
47 BuildRequires: libpng-devel
48 BuildRequires: libraw1394-devel
49 BuildRequires: libstdc++-devel
50 BuildRequires: libtiff-devel
51 BuildRequires: libtool
53 BuildRequires: libucil-devel
54 BuildRequires: libunicap-devel
56 BuildRequires: libv4l-devel
57 BuildRequires: pkgconfig
58 BuildRequires: python-devel
59 BuildRequires: python-numpy-devel
60 BuildRequires: rpm-pythonprov
61 BuildRequires: rpmbuild(macros) >= 1.600
62 BuildRequires: sed >= 4.0
63 BuildRequires: swig-python
64 %{?with_tbb:BuildRequires: tbb-devel}
65 %{?with_xine:BuildRequires: xine-lib-devel}
66 BuildRequires: zlib-devel
68 BuildRequires: OpenGL-devel
69 BuildRequires: QtCore-devel >= 4
70 BuildRequires: QtGui-devel >= 4
71 BuildRequires: QtOpenGL-devel >= 4
72 BuildRequires: qt4-qmake >= 4
74 BuildRequires: gtk+2-devel >= 2.0
76 # ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
77 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80 OpenCV (Open Source Computer Vision) is a library of programming
81 functions mainly aimed at real time computer vision.
83 Example applications of the OpenCV library are:
84 - Human-Computer Interaction (HCI)
85 - Object Identification, Segmentation and Recognition
89 - Ego Motion, Motion Understanding
90 - Structure From Motion (SFM)
91 - Stereo and Multi-Camera Calibration and Depth Computation
94 %description -l pl.UTF-8
95 OpenCV (Open Source Computer Vision) to biblioteka funkcji
96 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
98 Przykładowe zastosowania biblioteki OpenCV to
99 - interakcje człowiek-komputer (HCI)
100 - identyfikacja, segmentacja i rozpoznawanie obiektów
101 - rozpoznawanie twarzy
102 - rozpoznawanie gestów
105 - SFM (Structure From Motion)
106 - kalibracja dwu- i wielokamerowa, obliczanie głębi
110 Summary: Header files for OpenCV library
111 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
112 Group: Development/Libraries
113 Requires: %{name} = %{epoch}:%{version}-%{release}
114 Obsoletes: opencv-static
117 Header files for OpenCV library.
119 %description devel -l pl.UTF-8
120 Pliki nagłówkowe biblioteki OpenCV.
122 %package -n python-opencv
123 Summary: OpenCV Python bindings
124 Summary(pl.UTF-8): Wiązania Pythona do OpenCV
125 Group: Libraries/Python
126 Requires: %{name} = %{epoch}:%{version}-%{release}
127 %pyrequires_eq python-libs
129 %description -n python-opencv
130 OpenCV Python bindings.
132 %description -n python-opencv -l pl.UTF-8
133 Wiązania Pythona do OpenCV.
136 %setup -q -n OpenCV-%{version}
138 %undos CMakeLists.txt
139 %undos modules/gpu/CMakeLists.txt
151 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
152 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
153 %ifarch pentium4 %{x8664}
160 -DBUILD_NEW_PYTHON_SUPPORT=ON \
162 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
163 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
164 %{?with_qt:-DWITH_QT=ON -DWITH_QT_OPENGL=ON -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
165 %{?with_tbb:-DWITH_TBB=ON} \
166 %{?with_unicap:-DWITH_UNICAP=ON} \
167 %{!?with_v4l:-DWITH_V4L=OFF} \
168 %{?with_xine:-DWITH_XINE=ON}
173 rm -rf $RPM_BUILD_ROOT
175 %{__make} -C build install \
176 DESTDIR=$RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
179 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
182 rm -rf $RPM_BUILD_ROOT
184 %post -p /sbin/ldconfig
185 %postun -p /sbin/ldconfig
188 %defattr(644,root,root,755)
189 %attr(755,root,root) %{_bindir}/opencv_*
190 %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
191 %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.3
192 %dir %{_datadir}/OpenCV
193 %doc %{_datadir}/OpenCV/doc
194 %{_datadir}/OpenCV/haarcascades
195 %{_datadir}/OpenCV/lbpcascades
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_libdir}/libopencv_*.so
200 %{_includedir}/opencv
201 %{_includedir}/opencv2
202 %{_datadir}/OpenCV/OpenCVConfig*.cmake
203 %{_pkgconfigdir}/opencv.pc
205 %files -n python-opencv
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{py_sitedir}/cv2.so