]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- rel 1
[packages/opencv.git] / opencv.spec
CommitLineData
452b38e1 1#
8d499a62 2# TODO:
2acd8ac1 3# - Smartek GigEVisionSDK (http://www.smartekvision.com/ but I can't see SDK with Linux library?)
8d499a62 4# - CUDA support (on bcond)
5df3cf1b 5# - ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
a8d52c2e 6#
0c2d6b7d 7# Conditional build:
a55ba198
JB
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
8d5385eb
JB
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
a55ba198 16# - highgui options:
b3920a9d 17%bcond_without ffmpeg # FFMpeg support in highgui
1c9fe580
JB
18%bcond_without gstreamer # GStreamer support in highgui
19%bcond_with openni # OpenNI (Natural Interaction) support in highgui
a55ba198 20%bcond_with pvapi # PvAPI (AVT GigE cameras) support in highgui (proprietary)
1c9fe580 21%bcond_with qt # Qt backend instead of GTK+ in highgui
1c9fe580 22%bcond_with unicap # Unicap support in highgui (GPL)
a55ba198
JB
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)
1c9fe580 25%bcond_with xine # XINE support in highgui (GPL)
a8d52c2e 26#
1c9fe580
JB
27%ifarch pentium3 pentium4 %{x8664}
28%define with_sse 1
29%endif
30%ifarch pentium4 %{x8664}
31%define with_sse2 1
32%endif
901927d3 33Summary: A library of programming functions mainly aimed at real time computer vision
0c2d6b7d 34Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
901927d3 35Name: opencv
809ce413 36Version: 2.4.3
34b7c821 37Release: 1
901927d3 38Epoch: 1
d5e56e66
JB
39%if %{with unicap} || %{with xine}
40License: GPL (enforced by used libraries), BSD (opencv itself)
41%else
901927d3 42License: BSD
d5e56e66 43%endif
901927d3 44Group: Libraries
8ff92997 45Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
809ce413 46# Source0-md5: c0a5af4ff9d0d540684c0bf00ef35dbe
452b38e1 47Patch0: %{name}-cflags.patch
48Patch1: %{name}-link.patch
49Patch2: %{name}-unicap-c++.patch
50Patch3: %{name}-c.patch
51Patch4: %{name}-gcc.patch
809ce413 52Patch5: %{name}-ximea.patch
6994c4f7
JB
53Patch6: %{name}-ocl-fft.patch
54Patch7: %{name}-ocl-blas.patch
0c2d6b7d 55URL: http://opencv.willowgarage.com/
d5e56e66 56%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
8d5385eb 57%{?with_opencl:BuildRequires: OpenCL-devel}
0c2d6b7d 58BuildRequires: OpenEXR-devel
5df3cf1b
JB
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
1c9fe580 62%{?with_openni:BuildRequires: OpenNI-devel}
a55ba198 63%{?with_ximea:BuildRequires: XIMEA-devel}
ef4af528
JB
64%{?with_opencl_amdblas:BuildRequires: clAmdBlas-devel}
65%{?with_opencl_amdfft:BuildRequires: clAmdFft-devel}
0c2d6b7d
JB
66BuildRequires: cmake >= 2.4
67BuildRequires: doxygen
809ce413 68BuildRequires: eigen3 >= 3
b3920a9d 69%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.7}
0c2d6b7d
JB
70%if %{with gstreamer}
71BuildRequires: gstreamer-devel >= 0.10
72BuildRequires: gstreamer-plugins-base-devel >= 0.10
73%endif
901927d3
AM
74BuildRequires: jasper-devel
75BuildRequires: libdc1394-devel
76BuildRequires: libjpeg-devel
77BuildRequires: libpng-devel
78BuildRequires: libraw1394-devel
0c2d6b7d 79BuildRequires: libstdc++-devel
901927d3 80BuildRequires: libtiff-devel
148338c5 81BuildRequires: libtool
d5e56e66
JB
82%if %{with unicap}
83BuildRequires: libucil-devel
84BuildRequires: libunicap-devel
85%endif
0c2d6b7d 86BuildRequires: libv4l-devel
af6d2888 87BuildRequires: pkgconfig
901927d3 88BuildRequires: python-devel
0c2d6b7d 89BuildRequires: python-numpy-devel
901927d3 90BuildRequires: rpm-pythonprov
8d499a62 91BuildRequires: rpmbuild(macros) >= 1.606
1376dffe 92BuildRequires: sed >= 4.0
996927aa 93BuildRequires: swig-python
f8e040cc 94%{?with_tbb:BuildRequires: tbb-devel}
901927d3 95%{?with_xine:BuildRequires: xine-lib-devel}
452b38e1 96BuildRequires: zlib-devel
4afb606b 97%if %{with qt}
4afb606b
JB
98BuildRequires: QtCore-devel >= 4
99BuildRequires: QtGui-devel >= 4
5df3cf1b 100%{?with_opengl:BuildRequires: QtOpenGL-devel >= 4}
4afb606b
JB
101BuildRequires: qt4-qmake >= 4
102%else
103BuildRequires: gtk+2-devel >= 2.0
5df3cf1b 104%{?with_opengl:BuildRequires: gtkglext-devel >= 1.0}
4afb606b 105%endif
901927d3
AM
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
0c2d6b7d
JB
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.
901927d3
AM
137
138%package devel
0c2d6b7d
JB
139Summary: Header files for OpenCV library
140Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
901927d3
AM
141Group: Development/Libraries
142Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 143Obsoletes: opencv-static
901927d3
AM
144
145%description devel
0c2d6b7d 146Header files for OpenCV library.
901927d3 147
0c2d6b7d
JB
148%description devel -l pl.UTF-8
149Pliki nagłówkowe biblioteki OpenCV.
901927d3
AM
150
151%package -n python-opencv
152Summary: OpenCV Python bindings
0c2d6b7d
JB
153Summary(pl.UTF-8): Wiązania Pythona do OpenCV
154Group: Libraries/Python
cd1f0136 155Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 156%pyrequires_eq python-libs
901927d3
AM
157
158%description -n python-opencv
159OpenCV Python bindings.
160
0c2d6b7d
JB
161%description -n python-opencv -l pl.UTF-8
162Wiązania Pythona do OpenCV.
163
901927d3 164%prep
95daeb66 165%setup -q -n OpenCV-%{version}
54551f29 166
da67222a 167%undos CMakeLists.txt
1376dffe 168%undos modules/gpu/CMakeLists.txt
54551f29 169
1376dffe 170%patch0 -p1
171%patch1 -p1
29d82ddf 172%patch2 -p1
f8e040cc 173%patch3 -p1
75b912e9 174%patch4 -p1
809ce413 175%patch5 -p1
6994c4f7
JB
176%patch6 -p1
177%patch7 -p1
148338c5 178
901927d3 179%build
95daeb66
AM
180install -d build
181cd build
0c2d6b7d 182%cmake .. \
1c9fe580
JB
183 -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
184 -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \
95daeb66 185 -DBUILD_NEW_PYTHON_SUPPORT=ON \
8b9f61f7 186 -DUSE_O3=OFF \
b3920a9d 187 %{?with_ffmpeg:-DWITH_FFMPEG=ON} \
d5e56e66 188 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
8d5385eb
JB
189 %{?with_opencl:-DWITH_OPENCL=ON} \
190 %{?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=ON} \
191 %{?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=ON} \
5df3cf1b 192 %{?with_opengl:-DWITH_OPENGL=ON} \
1c9fe580 193 %{?with_openni:-DWITH_OPENNI=ON} \
809ce413 194 %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \
5df3cf1b 195 %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
f8e040cc 196 %{?with_tbb:-DWITH_TBB=ON} \
d5e56e66 197 %{?with_unicap:-DWITH_UNICAP=ON} \
ed358224 198 %{!?with_v4l:-DWITH_V4L=OFF} \
a55ba198 199 %{?with_ximea:-DWITH_XIMEA=ON} \
d5e56e66 200 %{?with_xine:-DWITH_XINE=ON}
54551f29 201
8b9f61f7 202%{__make}
901927d3
AM
203
204%install
205rm -rf $RPM_BUILD_ROOT
206
95daeb66 207%{__make} -C build install \
901927d3
AM
208 DESTDIR=$RPM_BUILD_ROOT
209
4bd2eae7
AM
210install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
211install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
212
8d499a62
JB
213%py_comp $RPM_BUILD_ROOT%{py_sitedir}
214%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
215%py_postclean
216
901927d3
AM
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)
0c2d6b7d
JB
225%attr(755,root,root) %{_bindir}/opencv_*
226%attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
8ff92997 227%attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.4
452b38e1 228%dir %{_datadir}/OpenCV
229%doc %{_datadir}/OpenCV/doc
230%{_datadir}/OpenCV/haarcascades
231%{_datadir}/OpenCV/lbpcascades
901927d3
AM
232
233%files devel
234%defattr(644,root,root,755)
0c2d6b7d 235%attr(755,root,root) %{_libdir}/libopencv_*.so
901927d3 236%{_includedir}/opencv
509c07dc 237%{_includedir}/opencv2
452b38e1 238%{_datadir}/OpenCV/OpenCVConfig*.cmake
0c2d6b7d 239%{_pkgconfigdir}/opencv.pc
901927d3
AM
240
241%files -n python-opencv
242%defattr(644,root,root,755)
452b38e1 243%attr(755,root,root) %{py_sitedir}/cv2.so
8d499a62 244%{py_sitedir}/cv.py[co]
This page took 0.066637 seconds and 4 git commands to generate.