]>
Commit | Line | Data |
---|---|---|
1 | %bcond_with xine | |
2 | Summary: A library of programming functions mainly aimed at real time computer vision | |
3 | Name: opencv | |
4 | Version: 2.1.0 | |
5 | Release: 1 | |
6 | Epoch: 1 | |
7 | License: BSD | |
8 | Group: Libraries | |
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 | |
14 | Patch3: %{name}-cflags.patch | |
15 | URL: http://opencv.willowgarage.com | |
16 | BuildRequires: cmake | |
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 | |
24 | BuildRequires: libtool | |
25 | BuildRequires: pkgconfig | |
26 | BuildRequires: python-devel | |
27 | BuildRequires: rpm-pythonprov | |
28 | BuildRequires: swig-python | |
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 | |
64 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
65 | ||
66 | %description -n python-opencv | |
67 | OpenCV Python bindings. | |
68 | ||
69 | %prep | |
70 | %setup -q -n OpenCV-%{version} | |
71 | ||
72 | %undos src/ml/CMakeLists.txt | |
73 | %undos CMakeLists.txt | |
74 | %undos src/cv/CMakeLists.txt | |
75 | %undos src/cxcore/CMakeLists.txt | |
76 | ||
77 | %patch0 -p0 | |
78 | %patch1 -p0 | |
79 | %patch2 -p1 | |
80 | %patch3 -p1 | |
81 | ||
82 | %build | |
83 | install -d build | |
84 | cd build | |
85 | %cmake \ | |
86 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ | |
87 | %ifarch i686 pentium4 athlon %{x8664} | |
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 \ | |
98 | -DWITH_V4L=ON \ | |
99 | %if "%{_lib}" == "lib64" | |
100 | -DLIB_SUFFIX=64 \ | |
101 | %endif | |
102 | ../ | |
103 | ||
104 | %{__make} \ | |
105 | VERBOSE=1 | |
106 | ||
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %{__make} -C build install \ | |
111 | DESTDIR=$RPM_BUILD_ROOT | |
112 | ||
113 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} | |
114 | install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
115 | ||
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) | |
124 | %attr(755,root,root) %{_bindir}/* | |
125 | %attr(755,root,root) %{_libdir}/lib*so.*.* | |
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 | |
131 | ||
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/lib*.so | |
135 | %{_includedir}/opencv | |
136 | %{_datadir}/opencv/OpenCVConfig.cmake | |
137 | %{_pkgconfigdir}/*.pc | |
138 | ||
139 | #%files static | |
140 | #%defattr(644,root,root,755) | |
141 | #%{_libdir}/lib*.a | |
142 | ||
143 | %files -n python-opencv | |
144 | %defattr(644,root,root,755) | |
145 | %attr(755,root,root) %{py_sitedir}/cv.so |