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