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