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