2 # TODO: re-enable static libs
5 Summary: A library of programming functions mainly aimed at real time computer vision
12 Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
13 # Source0-md5: 1d71584fb4e04214c0085108f95e24c8
14 Patch0: %{name}-2.0.0-libpng14.patch
15 Patch1: %{name}-2.1.0-mmap.patch
16 Patch2: %{name}-2.1.0-multilib.patch
17 Patch3: %{name}-cflags.patch
18 URL: http://opencv.willowgarage.com
20 BuildRequires: ffmpeg-devel
21 BuildRequires: jasper-devel
22 BuildRequires: libdc1394-devel
23 BuildRequires: libjpeg-devel
24 BuildRequires: libpng-devel
25 BuildRequires: libraw1394-devel
26 BuildRequires: libtiff-devel
27 BuildRequires: libtool
28 BuildRequires: pkgconfig
29 BuildRequires: python-devel
30 BuildRequires: rpm-pythonprov
31 BuildRequires: swig-python
32 BuildRequires: zlib-devel
33 %pyrequires_eq python-libs
34 %{?with_xine:BuildRequires: xine-lib-devel}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define skip_post_check_so libhighgui.so.%{version}
40 OpenCV (Open Source Computer Vision) is a library of programming
41 functions mainly aimed at real time computer vision.
43 Example applications of the OpenCV library are Human-Computer
44 Interaction (HCI); Object Identification, Segmentation and
45 Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
46 Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
47 and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
50 Summary: Header files and develpment documentation for opencv
51 Group: Development/Libraries
52 Requires: %{name} = %{epoch}:%{version}-%{release}
55 Header files and opencv documentation.
58 Summary: Static opencv library
59 Group: Development/Libraries
60 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
63 This package contains the static library used for development.
65 %package -n python-opencv
66 Summary: OpenCV Python bindings
67 Group: Development/Languages/Python
69 Requires: %{name} = %{epoch}:%{version}-%{release}
71 %description -n python-opencv
72 OpenCV Python bindings.
75 %setup -q -n OpenCV-%{version}
77 %undos src/ml/CMakeLists.txt
79 %undos src/cv/CMakeLists.txt
80 %undos src/cxcore/CMakeLists.txt
91 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
92 %ifarch i686 pentium4 athlon %{x8664}
95 -DBUILD_NEW_PYTHON_SUPPORT=ON \
99 -DWITH_GSTREAMER=OFF \
104 %if "%{_lib}" == "lib64"
113 rm -rf $RPM_BUILD_ROOT
115 %{__make} -C build install \
116 DESTDIR=$RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
119 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
122 rm -rf $RPM_BUILD_ROOT
124 %post -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_bindir}/*
130 %attr(755,root,root) %{_libdir}/lib*so.*.*
131 %attr(755,root,root) %ghost %{_libdir}/lib*.so.2.1
132 %dir %{_datadir}/opencv
133 %{_datadir}/opencv/doc
134 %{_datadir}/opencv/haarcascades
135 %{_datadir}/opencv/lbpcascades
138 %defattr(644,root,root,755)
139 %attr(755,root,root) %{_libdir}/lib*.so
140 %{_includedir}/opencv
141 %{_datadir}/opencv/OpenCVConfig.cmake
142 %{_pkgconfigdir}/*.pc
145 #%defattr(644,root,root,755)
148 %files -n python-opencv
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{py_sitedir}/cv.so