]> git.pld-linux.org Git - packages/opencv.git/blame_incremental - opencv.spec
- upstream support lib64 now
[packages/opencv.git] / opencv.spec
... / ...
CommitLineData
1#
2# TODO: - CUDA support (on bcond)
3# - consider name change to OpenCV
4#
5# Conditional build:
6%bcond_without gstreamer # GStreamer support
7%bcond_with pvapi # PvAPI (AVT GigE cameras) support
8%bcond_with qt # Qt backend instead of GTK+
9%bcond_with tbb # Threading Building Blocks support
10%bcond_with unicap # Unicap support (GPL)
11%bcond_with v4l # Video4Linux (even V4L2 support currently relies on V4L1 API)
12%bcond_with xine # XINE support (GPL)
13#
14Summary: A library of programming functions mainly aimed at real time computer vision
15Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
16Name: opencv
17Version: 2.3.1
18Release: 1
19Epoch: 1
20%if %{with unicap} || %{with xine}
21License: GPL (enforced by used libraries), BSD (opencv itself)
22%else
23License: BSD
24%endif
25Group: Libraries
26Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}a.tar.bz2
27# Source0-md5: 82e4b6bfa349777233eea09b075e931e
28Patch0: %{name}-cflags.patch
29Patch1: %{name}-link.patch
30Patch2: %{name}-unicap-c++.patch
31Patch3: %{name}-c.patch
32Patch4: %{name}-gcc.patch
33URL: http://opencv.willowgarage.com/
34%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
35BuildRequires: OpenEXR-devel
36BuildRequires: cmake >= 2.4
37BuildRequires: doxygen
38BuildRequires: eigen >= 2
39BuildRequires: ffmpeg-devel >= 0.7
40%if %{with gstreamer}
41BuildRequires: gstreamer-devel >= 0.10
42BuildRequires: gstreamer-plugins-base-devel >= 0.10
43%endif
44BuildRequires: jasper-devel
45BuildRequires: libdc1394-devel
46BuildRequires: libjpeg-devel
47BuildRequires: libpng-devel
48BuildRequires: libraw1394-devel
49BuildRequires: libstdc++-devel
50BuildRequires: libtiff-devel
51BuildRequires: libtool
52%if %{with unicap}
53BuildRequires: libucil-devel
54BuildRequires: libunicap-devel
55%endif
56BuildRequires: libv4l-devel
57BuildRequires: pkgconfig
58BuildRequires: python-devel
59BuildRequires: python-numpy-devel
60BuildRequires: rpm-pythonprov
61BuildRequires: rpmbuild(macros) >= 1.600
62BuildRequires: sed >= 4.0
63BuildRequires: swig-python
64%{?with_tbb:BuildRequires: tbb-devel}
65%{?with_xine:BuildRequires: xine-lib-devel}
66BuildRequires: zlib-devel
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)
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
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.
108
109%package devel
110Summary: Header files for OpenCV library
111Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
112Group: Development/Libraries
113Requires: %{name} = %{epoch}:%{version}-%{release}
114Obsoletes: opencv-static
115
116%description devel
117Header files for OpenCV library.
118
119%description devel -l pl.UTF-8
120Pliki nagłówkowe biblioteki OpenCV.
121
122%package -n python-opencv
123Summary: OpenCV Python bindings
124Summary(pl.UTF-8): Wiązania Pythona do OpenCV
125Group: Libraries/Python
126Requires: %{name} = %{epoch}:%{version}-%{release}
127%pyrequires_eq python-libs
128
129%description -n python-opencv
130OpenCV Python bindings.
131
132%description -n python-opencv -l pl.UTF-8
133Wiązania Pythona do OpenCV.
134
135%prep
136%setup -q -n OpenCV-%{version}
137
138%undos CMakeLists.txt
139%undos modules/gpu/CMakeLists.txt
140
141%patch0 -p1
142%patch1 -p1
143%patch2 -p1
144%patch3 -p1
145%patch4 -p1
146
147%build
148install -d build
149cd build
150%cmake .. \
151 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
152 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
153%ifarch pentium4 %{x8664}
154 -DENABLE_SSE=ON \
155 -DENABLE_SSE2=ON \
156%else
157 -DENABLE_SSE=OFF \
158 -DENABLE_SSE2=OFF \
159%endif
160 -DBUILD_NEW_PYTHON_SUPPORT=ON \
161 -DUSE_O3=OFF \
162 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
163 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
164 %{?with_qt:-DWITH_QT=ON -DWITH_QT_OPENGL=ON -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4} \
165 %{?with_tbb:-DWITH_TBB=ON} \
166 %{?with_unicap:-DWITH_UNICAP=ON} \
167 %{!?with_v4l:-DWITH_V4L=OFF} \
168 %{?with_xine:-DWITH_XINE=ON}
169
170%{__make}
171
172%install
173rm -rf $RPM_BUILD_ROOT
174
175%{__make} -C build install \
176 DESTDIR=$RPM_BUILD_ROOT
177
178install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
179install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
180
181%clean
182rm -rf $RPM_BUILD_ROOT
183
184%post -p /sbin/ldconfig
185%postun -p /sbin/ldconfig
186
187%files
188%defattr(644,root,root,755)
189%attr(755,root,root) %{_bindir}/opencv_*
190%attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
191%attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.3
192%dir %{_datadir}/OpenCV
193%doc %{_datadir}/OpenCV/doc
194%{_datadir}/OpenCV/haarcascades
195%{_datadir}/OpenCV/lbpcascades
196
197%files devel
198%defattr(644,root,root,755)
199%attr(755,root,root) %{_libdir}/libopencv_*.so
200%{_includedir}/opencv
201%{_includedir}/opencv2
202%{_datadir}/OpenCV/OpenCVConfig*.cmake
203%{_pkgconfigdir}/opencv.pc
204
205%files -n python-opencv
206%defattr(644,root,root,755)
207%attr(755,root,root) %{py_sitedir}/cv2.so
208%{py_sitedir}/cv.py
This page took 0.08425 seconds and 4 git commands to generate.