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