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