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