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