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