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