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