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