]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
- added unicap-c++ patch (workaround for "private" field name being a keyword in...
[packages/opencv.git] / opencv.spec
1 #
2 # Conditional build:
3 %bcond_without  gstreamer       # GStreamer support
4 %bcond_with     pvapi           # PvAPI (AVT GigE cameras) support
5 %bcond_with     tbb             # Threading Building Blocks support
6 %bcond_with     unicap          # Unicap support (GPL)
7 %bcond_with     xine            # XINE support (GPL)
8 #
9 Summary:        A library of programming functions mainly aimed at real time computer vision
10 Summary(pl.UTF-8):      Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
11 Name:           opencv
12 Version:        2.2.0
13 Release:        6
14 Epoch:          1
15 %if %{with unicap} || %{with xine}
16 License:        GPL (enforced by used libraries), BSD (opencv itself)
17 %else
18 License:        BSD
19 %endif
20 Group:          Libraries
21 Source0:        http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
22 # Source0-md5:  122c9ac793a46854ef2819fedbbd6b1b
23 Patch0:         %{name}-multilib.patch
24 Patch1:         %{name}-cflags.patch
25 Patch2:         %{name}-link.patch
26 Patch3:         %{name}-unicap-c++.patch
27 URL:            http://opencv.willowgarage.com/
28 %{?with_pvapi:BuildRequires:    AVT_GigE_SDK-devel}
29 BuildRequires:  OpenEXR-devel
30 BuildRequires:  cmake >= 2.4
31 BuildRequires:  doxygen
32 BuildRequires:  eigen >= 2
33 BuildRequires:  ffmpeg-devel
34 %if %{with gstreamer}
35 BuildRequires:  gstreamer-devel >= 0.10
36 BuildRequires:  gstreamer-plugins-base-devel >= 0.10
37 %endif
38 BuildRequires:  jasper-devel
39 BuildRequires:  gtk+2-devel
40 BuildRequires:  libdc1394-devel
41 BuildRequires:  libjpeg-devel
42 BuildRequires:  libpng-devel
43 BuildRequires:  libraw1394-devel
44 BuildRequires:  libstdc++-devel
45 BuildRequires:  libtiff-devel
46 BuildRequires:  libtool
47 %if %{with unicap}
48 BuildRequires:  libucil-devel
49 BuildRequires:  libunicap-devel
50 %endif
51 BuildRequires:  libv4l-devel
52 BuildRequires:  pkgconfig
53 BuildRequires:  python-devel
54 BuildRequires:  python-numpy-devel
55 BuildRequires:  rpm-pythonprov
56 BuildRequires:  rpmbuild(macros) >= 1.577
57 BuildRequires:  sed >= 4.0
58 BuildRequires:  swig-python
59 %{?with_tbb:BuildRequires:      tbb-devel}
60 BuildRequires:  zlib-devel
61 %{?with_xine:BuildRequires:     xine-lib-devel}
62 # TODO:
63 # - Qt (bcond replacing GTK+?)
64 # - cuda (on bcond)
65 # - ipp (libippi)
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 OpenCV (Open Source Computer Vision) is a library of programming
70 functions mainly aimed at real time computer vision.
71
72 Example 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
84 OpenCV (Open Source Computer Vision) to biblioteka funkcji
85 przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
86
87 Przykł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.
97
98 %package devel
99 Summary:        Header files for OpenCV library
100 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki OpenCV
101 Group:          Development/Libraries
102 Requires:       %{name} = %{epoch}:%{version}-%{release}
103 Obsoletes:      opencv-static
104
105 %description devel
106 Header files for OpenCV library.
107
108 %description devel -l pl.UTF-8
109 Pliki nagłówkowe biblioteki OpenCV.
110
111 %package -n python-opencv
112 Summary:        OpenCV Python bindings
113 Summary(pl.UTF-8):      Wiązania Pythona do OpenCV
114 Group:          Libraries/Python
115 Requires:       %{name} = %{epoch}:%{version}-%{release}
116 %pyrequires_eq  python-libs
117
118 %description -n python-opencv
119 OpenCV Python bindings.
120
121 %description -n python-opencv -l pl.UTF-8
122 Wiązania Pythona do OpenCV.
123
124 %prep
125 %setup -q -n OpenCV-%{version}
126
127 %undos CMakeLists.txt
128 %undos modules/gpu/CMakeLists.txt
129
130 %patch0 -p1
131 %patch1 -p1
132 %patch2 -p1
133 %patch3 -p1
134
135 %build
136 install -d build
137 cd build
138 %cmake .. \
139         -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
140         -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
141 %ifarch pentium4 %{x8664}
142         -DENABLE_SSE=ON \
143         -DENABLE_SSE2=ON \
144 %else
145         -DENABLE_SSE=OFF \
146         -DENABLE_SSE2=OFF \
147 %endif
148         -DBUILD_NEW_PYTHON_SUPPORT=ON \
149         -DUSE_O3=OFF \
150         %{!?with_gstreamer:-DWITH_GSTREAMER=OFF} \
151         %{!?with_pvapi:-DWITH_PVAPI=OFF} \
152         %{?with_tbb:-DWITH_TBB=ON} \
153         %{?with_unicap:-DWITH_UNICAP=ON} \
154         %{?with_xine:-DWITH_XINE=ON}
155
156 %{__make}
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 %{__make} -C build install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
165 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
166
167 %if "%{_lib}" == "lib64"
168 # upstream has no lib64 support
169 mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
170 %endif
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %post   -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
177
178 %files
179 %defattr(644,root,root,755)
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
183 %dir %{_datadir}/opencv
184 %doc %{_datadir}/opencv/doc
185 %{_datadir}/opencv/haarcascades
186 %{_datadir}/opencv/lbpcascades
187
188 %files devel
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_libdir}/libopencv_*.so
191 %{_includedir}/opencv
192 %{_includedir}/opencv2
193 %{_datadir}/opencv/OpenCVConfig.cmake
194 %{_pkgconfigdir}/opencv.pc
195
196 %files -n python-opencv
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.065585 seconds and 3 git commands to generate.