]>
Commit | Line | Data |
---|---|---|
a8d52c2e | 1 | # |
0c2d6b7d JB |
2 | # Conditional build: |
3 | %bcond_with gstreamer # GStreamer support | |
4 | %bcond_with xine # XINE support (GPL) | |
a8d52c2e | 5 | # |
901927d3 | 6 | Summary: A library of programming functions mainly aimed at real time computer vision |
0c2d6b7d | 7 | Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym |
901927d3 | 8 | Name: opencv |
1376dffe | 9 | Version: 2.2.0 |
a29d85f5 | 10 | Release: 6 |
901927d3 AM |
11 | Epoch: 1 |
12 | License: BSD | |
13 | Group: Libraries | |
95daeb66 | 14 | Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2 |
1376dffe | 15 | # Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b |
16 | Patch0: %{name}-multilib.patch | |
17 | Patch1: %{name}-cflags.patch | |
18 | Patch2: %{name}-link.patch | |
0c2d6b7d JB |
19 | URL: http://opencv.willowgarage.com/ |
20 | BuildRequires: OpenEXR-devel | |
21 | BuildRequires: cmake >= 2.4 | |
22 | BuildRequires: doxygen | |
901927d3 | 23 | BuildRequires: ffmpeg-devel |
0c2d6b7d JB |
24 | %if %{with gstreamer} |
25 | BuildRequires: gstreamer-devel >= 0.10 | |
26 | BuildRequires: gstreamer-plugins-base-devel >= 0.10 | |
27 | %endif | |
901927d3 | 28 | BuildRequires: jasper-devel |
0c2d6b7d | 29 | BuildRequires: gtk+2-devel |
901927d3 AM |
30 | BuildRequires: libdc1394-devel |
31 | BuildRequires: libjpeg-devel | |
32 | BuildRequires: libpng-devel | |
33 | BuildRequires: libraw1394-devel | |
0c2d6b7d | 34 | BuildRequires: libstdc++-devel |
901927d3 | 35 | BuildRequires: libtiff-devel |
148338c5 | 36 | BuildRequires: libtool |
0c2d6b7d | 37 | BuildRequires: libv4l-devel |
af6d2888 | 38 | BuildRequires: pkgconfig |
901927d3 | 39 | BuildRequires: python-devel |
0c2d6b7d | 40 | BuildRequires: python-numpy-devel |
901927d3 | 41 | BuildRequires: rpm-pythonprov |
1376dffe | 42 | BuildRequires: rpmbuild(macros) >= 1.577 |
43 | BuildRequires: sed >= 4.0 | |
996927aa | 44 | BuildRequires: swig-python |
901927d3 | 45 | BuildRequires: zlib-devel |
901927d3 | 46 | %{?with_xine:BuildRequires: xine-lib-devel} |
0c2d6b7d JB |
47 | # TODO: |
48 | # - unicap (libunicap, libucil) | |
49 | # - gstreamer | |
50 | # - pvapi (PvApi.h) | |
51 | # - Qt (bcond replacing GTK+?) | |
52 | # - tbb (tbb.pc) | |
53 | # - cuda (on bcond) | |
54 | # - eigen2/eigen3 (Eigen/Core headers) | |
55 | # - ipp (libippi) | |
901927d3 AM |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
cc676705 | 58 | %define skip_post_check_so libhighgui.so.%{version} |
59 | ||
901927d3 AM |
60 | %description |
61 | OpenCV (Open Source Computer Vision) is a library of programming | |
62 | functions mainly aimed at real time computer vision. | |
63 | ||
0c2d6b7d JB |
64 | Example applications of the OpenCV library are: |
65 | - Human-Computer Interaction (HCI) | |
66 | - Object Identification, Segmentation and Recognition | |
67 | - Face Recognition | |
68 | - Gesture Recognition | |
69 | - Motion Tracking | |
70 | - Ego Motion, Motion Understanding | |
71 | - Structure From Motion (SFM) | |
72 | - Stereo and Multi-Camera Calibration and Depth Computation | |
73 | - Mobile Robotics. | |
74 | ||
75 | %description -l pl.UTF-8 | |
76 | OpenCV (Open Source Computer Vision) to biblioteka funkcji | |
77 | przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym. | |
78 | ||
79 | Przykładowe zastosowania biblioteki OpenCV to | |
80 | - interakcje człowiek-komputer (HCI) | |
81 | - identyfikacja, segmentacja i rozpoznawanie obiektów | |
82 | - rozpoznawanie twarzy | |
83 | - rozpoznawanie gestów | |
84 | - śledzenie ruchu | |
85 | - rozumienie ruchu | |
86 | - SFM (Structure From Motion) | |
87 | - kalibracja dwu- i wielokamerowa, obliczanie głębi | |
88 | - robotyka ruchu. | |
901927d3 AM |
89 | |
90 | %package devel | |
0c2d6b7d JB |
91 | Summary: Header files for OpenCV library |
92 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV | |
901927d3 AM |
93 | Group: Development/Libraries |
94 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
0c2d6b7d | 95 | Obsoletes: opencv-static |
901927d3 AM |
96 | |
97 | %description devel | |
0c2d6b7d | 98 | Header files for OpenCV library. |
901927d3 | 99 | |
0c2d6b7d JB |
100 | %description devel -l pl.UTF-8 |
101 | Pliki nagłówkowe biblioteki OpenCV. | |
901927d3 AM |
102 | |
103 | %package -n python-opencv | |
104 | Summary: OpenCV Python bindings | |
0c2d6b7d JB |
105 | Summary(pl.UTF-8): Wiązania Pythona do OpenCV |
106 | Group: Libraries/Python | |
cd1f0136 | 107 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0c2d6b7d | 108 | %pyrequires_eq python-libs |
901927d3 AM |
109 | |
110 | %description -n python-opencv | |
111 | OpenCV Python bindings. | |
112 | ||
0c2d6b7d JB |
113 | %description -n python-opencv -l pl.UTF-8 |
114 | Wiązania Pythona do OpenCV. | |
115 | ||
901927d3 | 116 | %prep |
95daeb66 | 117 | %setup -q -n OpenCV-%{version} |
54551f29 | 118 | |
da67222a | 119 | %undos CMakeLists.txt |
1376dffe | 120 | %undos modules/gpu/CMakeLists.txt |
54551f29 | 121 | |
1376dffe | 122 | %patch0 -p1 |
123 | %patch1 -p1 | |
29d82ddf | 124 | %patch2 -p1 |
148338c5 | 125 | |
901927d3 | 126 | %build |
95daeb66 AM |
127 | install -d build |
128 | cd build | |
0c2d6b7d | 129 | %cmake .. \ |
8b9f61f7 JB |
130 | -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ |
131 | -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ | |
132 | %ifarch pentium4 %{x8664} | |
133 | -DENABLE_SSE=ON \ | |
95daeb66 | 134 | -DENABLE_SSE2=ON \ |
8b9f61f7 JB |
135 | %else |
136 | -DENABLE_SSE=OFF \ | |
137 | -DENABLE_SSE2=OFF \ | |
95daeb66 AM |
138 | %endif |
139 | -DBUILD_NEW_PYTHON_SUPPORT=ON \ | |
8b9f61f7 | 140 | -DUSE_O3=OFF \ |
95daeb66 AM |
141 | -DWITH_1394=ON \ |
142 | -DWITH_FFMPEG=ON \ | |
8b9f61f7 | 143 | -DWITH_GSTREAMER=OFF \ |
95daeb66 | 144 | -DWITH_GTK=ON \ |
8b9f61f7 JB |
145 | -DWITH_V4L=ON \ |
146 | %if %{with xine} | |
147 | -DWITH_XINE=ON | |
148 | %endif | |
54551f29 | 149 | |
8b9f61f7 | 150 | %{__make} |
901927d3 AM |
151 | |
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
95daeb66 | 155 | %{__make} -C build install \ |
901927d3 AM |
156 | DESTDIR=$RPM_BUILD_ROOT |
157 | ||
4bd2eae7 AM |
158 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} |
159 | install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
160 | ||
a29d85f5 | 161 | %if "%{_lib}" == "lib64" |
9175d525 AM |
162 | # upstream has no lib64 support |
163 | mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir} | |
164 | %endif | |
165 | ||
901927d3 AM |
166 | %clean |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
169 | %post -p /sbin/ldconfig | |
170 | %postun -p /sbin/ldconfig | |
171 | ||
172 | %files | |
173 | %defattr(644,root,root,755) | |
0c2d6b7d JB |
174 | %attr(755,root,root) %{_bindir}/opencv_* |
175 | %attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.* | |
176 | %attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.2 | |
4bd2eae7 | 177 | %dir %{_datadir}/opencv |
0c2d6b7d | 178 | %doc %{_datadir}/opencv/doc |
4bd2eae7 AM |
179 | %{_datadir}/opencv/haarcascades |
180 | %{_datadir}/opencv/lbpcascades | |
901927d3 AM |
181 | |
182 | %files devel | |
183 | %defattr(644,root,root,755) | |
0c2d6b7d | 184 | %attr(755,root,root) %{_libdir}/libopencv_*.so |
901927d3 | 185 | %{_includedir}/opencv |
509c07dc | 186 | %{_includedir}/opencv2 |
4bd2eae7 | 187 | %{_datadir}/opencv/OpenCVConfig.cmake |
0c2d6b7d | 188 | %{_pkgconfigdir}/opencv.pc |
901927d3 AM |
189 | |
190 | %files -n python-opencv | |
191 | %defattr(644,root,root,755) | |
4bd2eae7 | 192 | %attr(755,root,root) %{py_sitedir}/cv.so |