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