3 %bcond_without gstreamer # GStreamer support
4 %bcond_with pvapi # PvAPI (AVT GigE cameras) support
5 %bcond_with tbb # Threading Building Blocks support
6 %bcond_with unicap # Unicap support (GPL)
7 %bcond_with xine # XINE support (GPL)
9 Summary: A library of programming functions mainly aimed at real time computer vision
10 Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
15 %if %{with unicap} || %{with xine}
16 License: GPL (enforced by used libraries), BSD (opencv itself)
21 Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
22 # Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b
23 Patch0: %{name}-multilib.patch
24 Patch1: %{name}-cflags.patch
25 Patch2: %{name}-link.patch
26 Patch3: %{name}-unicap-c++.patch
27 URL: http://opencv.willowgarage.com/
28 %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
29 BuildRequires: OpenEXR-devel
30 BuildRequires: cmake >= 2.4
31 BuildRequires: doxygen
32 BuildRequires: eigen >= 2
33 BuildRequires: ffmpeg-devel
35 BuildRequires: gstreamer-devel >= 0.10
36 BuildRequires: gstreamer-plugins-base-devel >= 0.10
38 BuildRequires: jasper-devel
39 BuildRequires: gtk+2-devel
40 BuildRequires: libdc1394-devel
41 BuildRequires: libjpeg-devel
42 BuildRequires: libpng-devel
43 BuildRequires: libraw1394-devel
44 BuildRequires: libstdc++-devel
45 BuildRequires: libtiff-devel
46 BuildRequires: libtool
48 BuildRequires: libucil-devel
49 BuildRequires: libunicap-devel
51 BuildRequires: libv4l-devel
52 BuildRequires: pkgconfig
53 BuildRequires: python-devel
54 BuildRequires: python-numpy-devel
55 BuildRequires: rpm-pythonprov
56 BuildRequires: rpmbuild(macros) >= 1.577
57 BuildRequires: sed >= 4.0
58 BuildRequires: swig-python
59 %{?with_tbb:BuildRequires: tbb-devel}
60 BuildRequires: zlib-devel
61 %{?with_xine:BuildRequires: xine-lib-devel}
63 # - Qt (bcond replacing GTK+?)
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 OpenCV (Open Source Computer Vision) is a library of programming
70 functions mainly aimed at real time computer vision.
72 Example applications of the OpenCV library are:
73 - Human-Computer Interaction (HCI)
74 - Object Identification, Segmentation and Recognition
78 - Ego Motion, Motion Understanding
79 - Structure From Motion (SFM)
80 - Stereo and Multi-Camera Calibration and Depth Computation
83 %description -l pl.UTF-8
84 OpenCV (Open Source Computer Vision) to biblioteka funkcji
85 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
87 Przykładowe zastosowania biblioteki OpenCV to
88 - interakcje człowiek-komputer (HCI)
89 - identyfikacja, segmentacja i rozpoznawanie obiektów
90 - rozpoznawanie twarzy
91 - rozpoznawanie gestów
94 - SFM (Structure From Motion)
95 - kalibracja dwu- i wielokamerowa, obliczanie głębi
99 Summary: Header files for OpenCV library
100 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
101 Group: Development/Libraries
102 Requires: %{name} = %{epoch}:%{version}-%{release}
103 Obsoletes: opencv-static
106 Header files for OpenCV library.
108 %description devel -l pl.UTF-8
109 Pliki nagłówkowe biblioteki OpenCV.
111 %package -n python-opencv
112 Summary: OpenCV Python bindings
113 Summary(pl.UTF-8): Wiązania Pythona do OpenCV
114 Group: Libraries/Python
115 Requires: %{name} = %{epoch}:%{version}-%{release}
116 %pyrequires_eq python-libs
118 %description -n python-opencv
119 OpenCV Python bindings.
121 %description -n python-opencv -l pl.UTF-8
122 Wiązania Pythona do OpenCV.
125 %setup -q -n OpenCV-%{version}
127 %undos CMakeLists.txt
128 %undos modules/gpu/CMakeLists.txt
139 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
140 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
141 %ifarch pentium4 %{x8664}
148 -DBUILD_NEW_PYTHON_SUPPORT=ON \
150 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
151 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
152 %{?with_tbb:-DWITH_TBB=ON} \
153 %{?with_unicap:-DWITH_UNICAP=ON} \
154 %{?with_xine:-DWITH_XINE=ON}
159 rm -rf $RPM_BUILD_ROOT
161 %{__make} -C build install \
162 DESTDIR=$RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
165 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
167 %if "%{_lib}" == "lib64"
168 # upstream has no lib64 support
169 mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
173 rm -rf $RPM_BUILD_ROOT
175 %post -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/opencv_*
181 %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.2
183 %dir %{_datadir}/opencv
184 %doc %{_datadir}/opencv/doc
185 %{_datadir}/opencv/haarcascades
186 %{_datadir}/opencv/lbpcascades
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_libdir}/libopencv_*.so
191 %{_includedir}/opencv
192 %{_includedir}/opencv2
193 %{_datadir}/opencv/OpenCVConfig.cmake
194 %{_pkgconfigdir}/opencv.pc
196 %files -n python-opencv
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{py_sitedir}/cv.so