]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- added OpenCL support
[packages/opencv.git] / opencv.spec
CommitLineData
452b38e1 1#
8d499a62 2# TODO:
809ce413 3# - Smartek GigEVisionSDK (http://www.smartekvision.com/ ?)
8d5385eb 4# - finish AMD OpenCL routines support
8d499a62 5# - CUDA support (on bcond)
5df3cf1b 6# - ipp (libippi): http://software.intel.com/en-us/articles/intel-ipp/ (proprietary)
a8d52c2e 7#
0c2d6b7d 8# Conditional build:
a55ba198
JB
9# - general options:
10%bcond_with tbb # Threading Building Blocks support (everywhere)
11%bcond_with sse # use SSE instructions
12%bcond_with sse2 # use SSE2 instructions
8d5385eb
JB
13%bcond_without opencl # OpenCL support
14%bcond_with opencl_amdblas # AMD OpenCL BLAS routines
15%bcond_with opencl_amdfft # AMD OpenCL FFT routines
16%bcond_without opengl # OpenGL support
a55ba198 17# - highgui options:
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
JB
36Version: 2.4.3
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
0c2d6b7d 53URL: http://opencv.willowgarage.com/
d5e56e66 54%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
8d5385eb 55%{?with_opencl:BuildRequires: OpenCL-devel}
0c2d6b7d 56BuildRequires: OpenEXR-devel
5df3cf1b
JB
57%{?with_opengl:BuildRequires: OpenGL-devel}
58%{?with_opengl:BuildRequires: OpenGL-GLU-devel}
59# as of OpenCV 2.3.1-2.4.3 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
1c9fe580 60%{?with_openni:BuildRequires: OpenNI-devel}
a55ba198 61%{?with_ximea:BuildRequires: XIMEA-devel}
0c2d6b7d
JB
62BuildRequires: cmake >= 2.4
63BuildRequires: doxygen
809ce413 64BuildRequires: eigen3 >= 3
2812da73 65BuildRequires: ffmpeg-devel >= 0.7
0c2d6b7d
JB
66%if %{with gstreamer}
67BuildRequires: gstreamer-devel >= 0.10
68BuildRequires: gstreamer-plugins-base-devel >= 0.10
69%endif
901927d3
AM
70BuildRequires: jasper-devel
71BuildRequires: libdc1394-devel
72BuildRequires: libjpeg-devel
73BuildRequires: libpng-devel
74BuildRequires: libraw1394-devel
0c2d6b7d 75BuildRequires: libstdc++-devel
901927d3 76BuildRequires: libtiff-devel
148338c5 77BuildRequires: libtool
d5e56e66
JB
78%if %{with unicap}
79BuildRequires: libucil-devel
80BuildRequires: libunicap-devel
81%endif
0c2d6b7d 82BuildRequires: libv4l-devel
af6d2888 83BuildRequires: pkgconfig
901927d3 84BuildRequires: python-devel
0c2d6b7d 85BuildRequires: python-numpy-devel
901927d3 86BuildRequires: rpm-pythonprov
8d499a62 87BuildRequires: rpmbuild(macros) >= 1.606
1376dffe 88BuildRequires: sed >= 4.0
996927aa 89BuildRequires: swig-python
f8e040cc 90%{?with_tbb:BuildRequires: tbb-devel}
901927d3 91%{?with_xine:BuildRequires: xine-lib-devel}
452b38e1 92BuildRequires: zlib-devel
4afb606b 93%if %{with qt}
4afb606b
JB
94BuildRequires: QtCore-devel >= 4
95BuildRequires: QtGui-devel >= 4
5df3cf1b 96%{?with_opengl:BuildRequires: QtOpenGL-devel >= 4}
4afb606b
JB
97BuildRequires: qt4-qmake >= 4
98%else
99BuildRequires: gtk+2-devel >= 2.0
5df3cf1b 100%{?with_opengl:BuildRequires: gtkglext-devel >= 1.0}
4afb606b 101%endif
901927d3
AM
102BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103
104%description
105OpenCV (Open Source Computer Vision) is a library of programming
106functions mainly aimed at real time computer vision.
107
0c2d6b7d
JB
108Example applications of the OpenCV library are:
109- Human-Computer Interaction (HCI)
110- Object Identification, Segmentation and Recognition
111- Face Recognition
112- Gesture Recognition
113- Motion Tracking
114- Ego Motion, Motion Understanding
115- Structure From Motion (SFM)
116- Stereo and Multi-Camera Calibration and Depth Computation
117- Mobile Robotics.
118
119%description -l pl.UTF-8
120OpenCV (Open Source Computer Vision) to biblioteka funkcji
121przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
122
123Przykładowe zastosowania biblioteki OpenCV to
124- interakcje człowiek-komputer (HCI)
125- identyfikacja, segmentacja i rozpoznawanie obiektów
126- rozpoznawanie twarzy
127- rozpoznawanie gestów
128- śledzenie ruchu
129- rozumienie ruchu
130- SFM (Structure From Motion)
131- kalibracja dwu- i wielokamerowa, obliczanie głębi
132- robotyka ruchu.
901927d3
AM
133
134%package devel
0c2d6b7d
JB
135Summary: Header files for OpenCV library
136Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
901927d3
AM
137Group: Development/Libraries
138Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 139Obsoletes: opencv-static
901927d3
AM
140
141%description devel
0c2d6b7d 142Header files for OpenCV library.
901927d3 143
0c2d6b7d
JB
144%description devel -l pl.UTF-8
145Pliki nagłówkowe biblioteki OpenCV.
901927d3
AM
146
147%package -n python-opencv
148Summary: OpenCV Python bindings
0c2d6b7d
JB
149Summary(pl.UTF-8): Wiązania Pythona do OpenCV
150Group: Libraries/Python
cd1f0136 151Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 152%pyrequires_eq python-libs
901927d3
AM
153
154%description -n python-opencv
155OpenCV Python bindings.
156
0c2d6b7d
JB
157%description -n python-opencv -l pl.UTF-8
158Wiązania Pythona do OpenCV.
159
901927d3 160%prep
95daeb66 161%setup -q -n OpenCV-%{version}
54551f29 162
da67222a 163%undos CMakeLists.txt
1376dffe 164%undos modules/gpu/CMakeLists.txt
54551f29 165
1376dffe 166%patch0 -p1
167%patch1 -p1
29d82ddf 168%patch2 -p1
f8e040cc 169%patch3 -p1
75b912e9 170%patch4 -p1
809ce413 171%patch5 -p1
148338c5 172
901927d3 173%build
95daeb66
AM
174install -d build
175cd build
0c2d6b7d 176%cmake .. \
1c9fe580
JB
177 -DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
178 -DENABLE_SSE2=%{?with_sse2:ON}%{!?with_sse2:OFF} \
95daeb66 179 -DBUILD_NEW_PYTHON_SUPPORT=ON \
8b9f61f7 180 -DUSE_O3=OFF \
d5e56e66 181 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
8d5385eb
JB
182 %{?with_opencl:-DWITH_OPENCL=ON} \
183 %{?with_opencl_amdblas:-DWITH_OPENCLAMDBLAS=ON} \
184 %{?with_opencl_amdfft:-DWITH_OPENCLAMDFFT=ON} \
5df3cf1b 185 %{?with_opengl:-DWITH_OPENGL=ON} \
1c9fe580 186 %{?with_openni:-DWITH_OPENNI=ON} \
809ce413 187 %{?with_pvapi:-DPVAPI_LIBRARY=%{_libdir}/libPvAPI.so}%{!?with_pvapi:-DWITH_PVAPI=OFF} \
5df3cf1b 188 %{?with_qt:-DWITH_QT=ON %{?with_opengl:-DWITH_QT_OPENGL=ON} -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
f8e040cc 189 %{?with_tbb:-DWITH_TBB=ON} \
d5e56e66 190 %{?with_unicap:-DWITH_UNICAP=ON} \
ed358224 191 %{!?with_v4l:-DWITH_V4L=OFF} \
a55ba198 192 %{?with_ximea:-DWITH_XIMEA=ON} \
d5e56e66 193 %{?with_xine:-DWITH_XINE=ON}
54551f29 194
8b9f61f7 195%{__make}
901927d3
AM
196
197%install
198rm -rf $RPM_BUILD_ROOT
199
95daeb66 200%{__make} -C build install \
901927d3
AM
201 DESTDIR=$RPM_BUILD_ROOT
202
4bd2eae7
AM
203install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
204install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
205
8d499a62
JB
206%py_comp $RPM_BUILD_ROOT%{py_sitedir}
207%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
208%py_postclean
209
901927d3
AM
210%clean
211rm -rf $RPM_BUILD_ROOT
212
213%post -p /sbin/ldconfig
214%postun -p /sbin/ldconfig
215
216%files
217%defattr(644,root,root,755)
0c2d6b7d
JB
218%attr(755,root,root) %{_bindir}/opencv_*
219%attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
8ff92997 220%attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.4
452b38e1 221%dir %{_datadir}/OpenCV
222%doc %{_datadir}/OpenCV/doc
223%{_datadir}/OpenCV/haarcascades
224%{_datadir}/OpenCV/lbpcascades
901927d3
AM
225
226%files devel
227%defattr(644,root,root,755)
0c2d6b7d 228%attr(755,root,root) %{_libdir}/libopencv_*.so
901927d3 229%{_includedir}/opencv
509c07dc 230%{_includedir}/opencv2
452b38e1 231%{_datadir}/OpenCV/OpenCVConfig*.cmake
0c2d6b7d 232%{_pkgconfigdir}/opencv.pc
901927d3
AM
233
234%files -n python-opencv
235%defattr(644,root,root,755)
452b38e1 236%attr(755,root,root) %{py_sitedir}/cv2.so
8d499a62 237%{py_sitedir}/cv.py[co]
This page took 0.179197 seconds and 4 git commands to generate.