]> git.pld-linux.org Git - packages/opencv.git/blame_incremental - opencv.spec
- rel 1
[packages/opencv.git] / opencv.spec
... / ...
CommitLineData
1#
2# TODO:
3# - Smartek GigEVisionSDK (http://www.smartekvision.com/ but I can't see SDK with Linux library?)
4# - CUDA support (on bcond)
5# - ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
6#
7# Conditional build:
8# - general options:
9%bcond_with tbb # Threading Building Blocks support (everywhere)
10%bcond_with sse # use SSE instructions
11%bcond_with sse2 # use SSE2 instructions
12%bcond_without opencl # OpenCL support
13%bcond_with opencl_amdblas # AMD OpenCL BLAS routines
14%bcond_with opencl_amdfft # AMD OpenCL FFT routines
15%bcond_without opengl # OpenGL support
16# - highgui options:
17%bcond_without ffmpeg # FFMpeg support in highgui
18%bcond_without gstreamer # GStreamer support in highgui
19%bcond_with openni # OpenNI (Natural Interaction) support in highgui
20%bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary)
21%bcond_with qt # Qt backend instead of GTK+ in highgui
22%bcond_with unicap # Unicap support in highgui (GPL)
23%bcond_with v4l # Video4Linux in highgui (even V4L2 support currently relies on V4L1 API)
24%bcond_with ximea # m3API (XIMEA cameras) support in highgui (proprietary)
25%bcond_with xine # XINE support in highgui (GPL)
26#
27%ifarch pentium3 pentium4 %{x8664}
28%define with_sse 1
29%endif
30%ifarch pentium4 %{x8664}
31%define with_sse2 1
32%endif
33Summary: A library of programming functions mainly aimed at real time computer vision
34Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
35Name: opencv
36Version: 2.4.3
37Release: 1
38Epoch: 1
39%if %{with unicap} || %{with xine}
40License: GPL (enforced by used libraries), BSD (opencv itself)
41%else
42License: BSD
43%endif
44Group: Libraries
45Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
46# Source0-md5: c0a5af4ff9d0d540684c0bf00ef35dbe
47Patch0: %{name}-cflags.patch
48Patch1: %{name}-link.patch
49Patch2: %{name}-unicap-c++.patch
50Patch3: %{name}-c.patch
51Patch4: %{name}-gcc.patch
52Patch5: %{name}-ximea.patch
53Patch6: %{name}-ocl-fft.patch
54Patch7: %{name}-ocl-blas.patch
55URL: http://opencv.willowgarage.com/
56%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
57%{?with_opencl:BuildRequires: OpenCL-devel}
58BuildRequires: OpenEXR-devel
59%{?with_opengl:BuildRequires: OpenGL-devel}
60%{?with_opengl:BuildRequires: OpenGL-GLU-devel}
61# as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
62%{?with_openni:BuildRequires: OpenNI-devel}
63%{?with_ximea:BuildRequires: XIMEA-devel}
64%{?with_opencl_amdblas:BuildRequires: clAmdBlas-devel}
65%{?with_opencl_amdfft:BuildRequires: clAmdFft-devel}
66BuildRequires: cmake >= 2.4
67BuildRequires: doxygen
68BuildRequires: eigen3 >= 3
69%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.7}
70%if %{with gstreamer}
71BuildRequires: gstreamer-devel >= 0.10
72BuildRequires: gstreamer-plugins-base-devel >= 0.10
73%endif
74BuildRequires: jasper-devel
75BuildRequires: libdc1394-devel
76BuildRequires: libjpeg-devel
77BuildRequires: libpng-devel
78BuildRequires: libraw1394-devel
79BuildRequires: libstdc++-devel
80BuildRequires: libtiff-devel
81BuildRequires: libtool
82%if %{with unicap}
83BuildRequires: libucil-devel
84BuildRequires: libunicap-devel
85%endif
86BuildRequires: libv4l-devel
87BuildRequires: pkgconfig
88BuildRequires: python-devel
89BuildRequires: python-numpy-devel
90BuildRequires: rpm-pythonprov
91BuildRequires: rpmbuild(macros) >= 1.606
92BuildRequires: sed >= 4.0
93BuildRequires: swig-python
94%{?with_tbb:BuildRequires: tbb-devel}
95%{?with_xine:BuildRequires: xine-lib-devel}
96BuildRequires: zlib-devel
97%if %{with qt}
98BuildRequires: QtCore-devel >= 4
99BuildRequires: QtGui-devel >= 4
100%{?with_opengl:BuildRequires: QtOpenGL-devel >= 4}
101BuildRequires: qt4-qmake >= 4
102%else
103BuildRequires: gtk+2-devel >= 2.0
104%{?with_opengl:BuildRequires: gtkglext-devel >= 1.0}
105%endif
106BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
107
108%description
109OpenCV (Open Source Computer Vision) is a library of programming
110functions mainly aimed at real time computer vision.
111
112Example applications of the OpenCV library are:
113- Human-Computer Interaction (HCI)
114- Object Identification, Segmentation and Recognition
115- Face Recognition
116- Gesture Recognition
117- Motion Tracking
118- Ego Motion, Motion Understanding
119- Structure From Motion (SFM)
120- Stereo and Multi-Camera Calibration and Depth Computation
121- Mobile Robotics.
122
123%description -l pl.UTF-8
124OpenCV (Open Source Computer Vision) to biblioteka funkcji
125przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
126
127Przykładowe zastosowania biblioteki OpenCV to
128- interakcje człowiek-komputer (HCI)
129- identyfikacja, segmentacja i rozpoznawanie obiektów
130- rozpoznawanie twarzy
131- rozpoznawanie gestów
132- śledzenie ruchu
133- rozumienie ruchu
134- SFM (Structure From Motion)
135- kalibracja dwu- i wielokamerowa, obliczanie głębi
136- robotyka ruchu.
137
138%package devel
139Summary: Header files for OpenCV library
140Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
141Group: Development/Libraries
142Requires: %{name} = %{epoch}:%{version}-%{release}
143Obsoletes: opencv-static
144
145%description devel
146Header files for OpenCV library.
147
148%description devel -l pl.UTF-8
149Pliki nagłówkowe biblioteki OpenCV.
150
151%package -n python-opencv
152Summary: OpenCV Python bindings
153Summary(pl.UTF-8): Wiązania Pythona do OpenCV
154Group: Libraries/Python
155Requires: %{name} = %{epoch}:%{version}-%{release}
156%pyrequires_eq python-libs
157
158%description -n python-opencv
159OpenCV Python bindings.
160
161%description -n python-opencv -l pl.UTF-8
162Wiązania Pythona do OpenCV.
163
164%prep
165%setup -q -n OpenCV-%{version}
166
167%undos CMakeLists.txt
168%undos modules/gpu/CMakeLists.txt
169
170%patch0 -p1
171%patch1 -p1
172%patch2 -p1
173%patch3 -p1
174%patch4 -p1
175%patch5 -p1
176%patch6 -p1
177%patch7 -p1
178
179%build
180install -d build
181cd build
182%cmake .. \
183 -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
184 -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \
185 -DBUILD_NEW_PYTHON_SUPPORT=ON \
186 -DUSE_O3=OFF \
187 %{?with_ffmpeg:-DWITH_FFMPEG=ON} \
188 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
189 %{?with_opencl:-DWITH_OPENCL=ON} \
190 %{?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=ON} \
191 %{?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=ON} \
192 %{?with_opengl:-DWITH_OPENGL=ON} \
193 %{?with_openni:-DWITH_OPENNI=ON} \
194 %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \
195 %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
196 %{?with_tbb:-DWITH_TBB=ON} \
197 %{?with_unicap:-DWITH_UNICAP=ON} \
198 %{!?with_v4l:-DWITH_V4L=OFF} \
199 %{?with_ximea:-DWITH_XIMEA=ON} \
200 %{?with_xine:-DWITH_XINE=ON}
201
202%{__make}
203
204%install
205rm -rf $RPM_BUILD_ROOT
206
207%{__make} -C build install \
208 DESTDIR=$RPM_BUILD_ROOT
209
210install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
211install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
212
213%py_comp $RPM_BUILD_ROOT%{py_sitedir}
214%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
215%py_postclean
216
217%clean
218rm -rf $RPM_BUILD_ROOT
219
220%post -p /sbin/ldconfig
221%postun -p /sbin/ldconfig
222
223%files
224%defattr(644,root,root,755)
225%attr(755,root,root) %{_bindir}/opencv_*
226%attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
227%attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.4
228%dir %{_datadir}/OpenCV
229%doc %{_datadir}/OpenCV/doc
230%{_datadir}/OpenCV/haarcascades
231%{_datadir}/OpenCV/lbpcascades
232
233%files devel
234%defattr(644,root,root,755)
235%attr(755,root,root) %{_libdir}/libopencv_*.so
236%{_includedir}/opencv
237%{_includedir}/opencv2
238%{_datadir}/OpenCV/OpenCVConfig*.cmake
239%{_pkgconfigdir}/opencv.pc
240
241%files -n python-opencv
242%defattr(644,root,root,755)
243%attr(755,root,root) %{py_sitedir}/cv2.so
244%{py_sitedir}/cv.py[co]
This page took 1.307185 seconds and 4 git commands to generate.