]>
Commit | Line | Data |
---|---|---|
901927d3 | 1 | %bcond_with xine |
901927d3 AM |
2 | Summary: A library of programming functions mainly aimed at real time computer vision |
3 | Name: opencv | |
95daeb66 | 4 | Version: 2.1.0 |
4bd2eae7 | 5 | Release: 1 |
901927d3 AM |
6 | Epoch: 1 |
7 | License: BSD | |
8 | Group: Libraries | |
95daeb66 AM |
9 | Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2 |
10 | # Source0-md5: 1d71584fb4e04214c0085108f95e24c8 | |
11 | Patch0: %{name}-2.0.0-libpng14.patch | |
12 | Patch1: %{name}-2.1.0-mmap.patch | |
13 | Patch2: %{name}-2.1.0-multilib.patch | |
54551f29 | 14 | Patch3: %{name}-cflags.patch |
901927d3 | 15 | URL: http://opencv.willowgarage.com |
95daeb66 | 16 | BuildRequires: cmake |
901927d3 AM |
17 | BuildRequires: ffmpeg-devel |
18 | BuildRequires: jasper-devel | |
19 | BuildRequires: libdc1394-devel | |
20 | BuildRequires: libjpeg-devel | |
21 | BuildRequires: libpng-devel | |
22 | BuildRequires: libraw1394-devel | |
23 | BuildRequires: libtiff-devel | |
148338c5 | 24 | BuildRequires: libtool |
af6d2888 | 25 | BuildRequires: pkgconfig |
901927d3 AM |
26 | BuildRequires: python-devel |
27 | BuildRequires: rpm-pythonprov | |
996927aa | 28 | BuildRequires: swig-python |
901927d3 AM |
29 | BuildRequires: zlib-devel |
30 | %pyrequires_eq python-libs | |
31 | %{?with_xine:BuildRequires: xine-lib-devel} | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | OpenCV (Open Source Computer Vision) is a library of programming | |
36 | functions mainly aimed at real time computer vision. | |
37 | ||
38 | Example applications of the OpenCV library are Human-Computer | |
39 | Interaction (HCI); Object Identification, Segmentation and | |
40 | Recognition; Face Recognition; Gesture Recognition; Motion Tracking, | |
41 | Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo | |
42 | and Multi-Camera Calibration and Depth Computation; Mobile Robotics. | |
43 | ||
44 | %package devel | |
45 | Summary: Header files and develpment documentation for opencv | |
46 | Group: Development/Libraries | |
47 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
48 | ||
49 | %description devel | |
50 | Header files and opencv documentation. | |
51 | ||
52 | %package static | |
53 | Summary: Static opencv library | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
56 | ||
57 | %description static | |
58 | This package contains the static library used for development. | |
59 | ||
60 | %package -n python-opencv | |
61 | Summary: OpenCV Python bindings | |
62 | Group: Development/Languages/Python | |
63 | %pyrequires_eq python | |
cd1f0136 | 64 | Requires: %{name} = %{epoch}:%{version}-%{release} |
901927d3 AM |
65 | |
66 | %description -n python-opencv | |
67 | OpenCV Python bindings. | |
68 | ||
69 | %prep | |
95daeb66 | 70 | %setup -q -n OpenCV-%{version} |
54551f29 | 71 | |
72 | %undos src/ml/CMakeLists.txt | |
73 | %undos CMakeLists.txt | |
74 | %undos src/cv/CMakeLists.txt | |
75 | %undos src/cxcore/CMakeLists.txt | |
76 | ||
148338c5 | 77 | %patch0 -p0 |
95daeb66 | 78 | %patch1 -p0 |
29d82ddf | 79 | %patch2 -p1 |
54551f29 | 80 | %patch3 -p1 |
148338c5 | 81 | |
901927d3 | 82 | %build |
95daeb66 AM |
83 | install -d build |
84 | cd build | |
85 | %cmake \ | |
4bd2eae7 | 86 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
901927d3 | 87 | %ifarch i686 pentium4 athlon %{x8664} |
95daeb66 AM |
88 | -DENABLE_SSE2=ON \ |
89 | %endif | |
90 | -DBUILD_NEW_PYTHON_SUPPORT=ON \ | |
91 | %if %{with xine} | |
92 | -DWITH_XINE=ON \ | |
93 | %endif | |
94 | -DWITH_GSTREAMER=OFF \ | |
95 | -DWITH_1394=ON \ | |
96 | -DWITH_FFMPEG=ON \ | |
97 | -DWITH_GTK=ON \ | |
4bd2eae7 | 98 | -DWITH_V4L=ON \ |
95daeb66 | 99 | %if "%{_lib}" == "lib64" |
4bd2eae7 | 100 | -DLIB_SUFFIX=64 \ |
901927d3 | 101 | %endif |
95daeb66 | 102 | ../ |
54551f29 | 103 | |
95daeb66 AM |
104 | %{__make} \ |
105 | VERBOSE=1 | |
901927d3 AM |
106 | |
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
95daeb66 | 110 | %{__make} -C build install \ |
901927d3 AM |
111 | DESTDIR=$RPM_BUILD_ROOT |
112 | ||
4bd2eae7 AM |
113 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
114 | install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
115 | ||
901927d3 AM |
116 | %clean |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %post -p /sbin/ldconfig | |
120 | %postun -p /sbin/ldconfig | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
901927d3 AM |
124 | %attr(755,root,root) %{_bindir}/* |
125 | %attr(755,root,root) %{_libdir}/lib*so.*.* | |
4bd2eae7 AM |
126 | %attr(755,root,root) %ghost %{_libdir}/lib*.so.2.1 |
127 | %dir %{_datadir}/opencv | |
128 | %{_datadir}/opencv/doc | |
129 | %{_datadir}/opencv/haarcascades | |
130 | %{_datadir}/opencv/lbpcascades | |
901927d3 AM |
131 | |
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/lib*.so | |
901927d3 | 135 | %{_includedir}/opencv |
4bd2eae7 | 136 | %{_datadir}/opencv/OpenCVConfig.cmake |
901927d3 AM |
137 | %{_pkgconfigdir}/*.pc |
138 | ||
4bd2eae7 AM |
139 | #%files static |
140 | #%defattr(644,root,root,755) | |
141 | #%{_libdir}/lib*.a | |
901927d3 AM |
142 | |
143 | %files -n python-opencv | |
144 | %defattr(644,root,root,755) | |
4bd2eae7 | 145 | %attr(755,root,root) %{py_sitedir}/cv.so |