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