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