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