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