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