]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- gstreamer enabled by default
[packages/opencv.git] / opencv.spec
CommitLineData
a8d52c2e 1#
0c2d6b7d 2# Conditional build:
d5e56e66
JB
3%bcond_without gstreamer # GStreamer support
4%bcond_with pvapi # PvAPI (AVT GigE cameras) support
5%bcond_with unicap # Unicap support (GPL)
0c2d6b7d 6%bcond_with xine # XINE support (GPL)
a8d52c2e 7#
901927d3 8Summary: A library of programming functions mainly aimed at real time computer vision
0c2d6b7d 9Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
901927d3 10Name: opencv
1376dffe 11Version: 2.2.0
a29d85f5 12Release: 6
901927d3 13Epoch: 1
d5e56e66
JB
14%if %{with unicap} || %{with xine}
15License: GPL (enforced by used libraries), BSD (opencv itself)
16%else
901927d3 17License: BSD
d5e56e66 18%endif
901927d3 19Group: Libraries
95daeb66 20Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
1376dffe 21# Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b
22Patch0: %{name}-multilib.patch
23Patch1: %{name}-cflags.patch
24Patch2: %{name}-link.patch
0c2d6b7d 25URL: http://opencv.willowgarage.com/
d5e56e66 26%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
0c2d6b7d
JB
27BuildRequires: OpenEXR-devel
28BuildRequires: cmake >= 2.4
29BuildRequires: doxygen
901927d3 30BuildRequires: ffmpeg-devel
0c2d6b7d
JB
31%if %{with gstreamer}
32BuildRequires: gstreamer-devel >= 0.10
33BuildRequires: gstreamer-plugins-base-devel >= 0.10
34%endif
901927d3 35BuildRequires: jasper-devel
0c2d6b7d 36BuildRequires: gtk+2-devel
901927d3
AM
37BuildRequires: libdc1394-devel
38BuildRequires: libjpeg-devel
39BuildRequires: libpng-devel
40BuildRequires: libraw1394-devel
0c2d6b7d 41BuildRequires: libstdc++-devel
901927d3 42BuildRequires: libtiff-devel
148338c5 43BuildRequires: libtool
d5e56e66
JB
44%if %{with unicap}
45BuildRequires: libucil-devel
46BuildRequires: libunicap-devel
47%endif
0c2d6b7d 48BuildRequires: libv4l-devel
af6d2888 49BuildRequires: pkgconfig
901927d3 50BuildRequires: python-devel
0c2d6b7d 51BuildRequires: python-numpy-devel
901927d3 52BuildRequires: rpm-pythonprov
1376dffe 53BuildRequires: rpmbuild(macros) >= 1.577
54BuildRequires: sed >= 4.0
996927aa 55BuildRequires: swig-python
901927d3 56BuildRequires: zlib-devel
901927d3 57%{?with_xine:BuildRequires: xine-lib-devel}
0c2d6b7d 58# TODO:
0c2d6b7d
JB
59# - Qt (bcond replacing GTK+?)
60# - tbb (tbb.pc)
61# - cuda (on bcond)
62# - eigen2/eigen3 (Eigen/Core headers)
63# - ipp (libippi)
901927d3
AM
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
0c2d6b7d
JB
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.
901927d3
AM
95
96%package devel
0c2d6b7d
JB
97Summary: Header files for OpenCV library
98Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
901927d3
AM
99Group: Development/Libraries
100Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 101Obsoletes: opencv-static
901927d3
AM
102
103%description devel
0c2d6b7d 104Header files for OpenCV library.
901927d3 105
0c2d6b7d
JB
106%description devel -l pl.UTF-8
107Pliki nagłówkowe biblioteki OpenCV.
901927d3
AM
108
109%package -n python-opencv
110Summary: OpenCV Python bindings
0c2d6b7d
JB
111Summary(pl.UTF-8): Wiązania Pythona do OpenCV
112Group: Libraries/Python
cd1f0136 113Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 114%pyrequires_eq python-libs
901927d3
AM
115
116%description -n python-opencv
117OpenCV Python bindings.
118
0c2d6b7d
JB
119%description -n python-opencv -l pl.UTF-8
120Wiązania Pythona do OpenCV.
121
901927d3 122%prep
95daeb66 123%setup -q -n OpenCV-%{version}
54551f29 124
da67222a 125%undos CMakeLists.txt
1376dffe 126%undos modules/gpu/CMakeLists.txt
54551f29 127
1376dffe 128%patch0 -p1
129%patch1 -p1
29d82ddf 130%patch2 -p1
148338c5 131
901927d3 132%build
95daeb66
AM
133install -d build
134cd build
0c2d6b7d 135%cmake .. \
8b9f61f7
JB
136 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
137 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
138%ifarch pentium4 %{x8664}
139 -DENABLE_SSE=ON \
95daeb66 140 -DENABLE_SSE2=ON \
8b9f61f7
JB
141%else
142 -DENABLE_SSE=OFF \
143 -DENABLE_SSE2=OFF \
95daeb66
AM
144%endif
145 -DBUILD_NEW_PYTHON_SUPPORT=ON \
8b9f61f7 146 -DUSE_O3=OFF \
d5e56e66
JB
147 %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
148 %{!?with_pvapi:-DWITH_PVAPI=OFF} \
149 %{?with_unicap:-DWITH_UNICAP=ON} \
150 %{?with_xine:-DWITH_XINE=ON}
54551f29 151
8b9f61f7 152%{__make}
901927d3
AM
153
154%install
155rm -rf $RPM_BUILD_ROOT
156
95daeb66 157%{__make} -C build install \
901927d3
AM
158 DESTDIR=$RPM_BUILD_ROOT
159
4bd2eae7
AM
160install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
161install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
162
a29d85f5 163%if "%{_lib}" == "lib64"
9175d525
AM
164# upstream has no lib64 support
165mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
166%endif
167
901927d3
AM
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)
0c2d6b7d
JB
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
4bd2eae7 179%dir %{_datadir}/opencv
0c2d6b7d 180%doc %{_datadir}/opencv/doc
4bd2eae7
AM
181%{_datadir}/opencv/haarcascades
182%{_datadir}/opencv/lbpcascades
901927d3
AM
183
184%files devel
185%defattr(644,root,root,755)
0c2d6b7d 186%attr(755,root,root) %{_libdir}/libopencv_*.so
901927d3 187%{_includedir}/opencv
509c07dc 188%{_includedir}/opencv2
4bd2eae7 189%{_datadir}/opencv/OpenCVConfig.cmake
0c2d6b7d 190%{_pkgconfigdir}/opencv.pc
901927d3
AM
191
192%files -n python-opencv
193%defattr(644,root,root,755)
4bd2eae7 194%attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.12098 seconds and 4 git commands to generate.