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