]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- updated cflags patch to remove -march=i686 from CFLAGS
[packages/opencv.git] / opencv.spec
CommitLineData
a8d52c2e 1#
0c2d6b7d
JB
2# Conditional build:
3%bcond_with gstreamer # GStreamer support
4%bcond_with xine # XINE support (GPL)
a8d52c2e 5#
901927d3 6Summary: A library of programming functions mainly aimed at real time computer vision
0c2d6b7d 7Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
901927d3 8Name: opencv
1376dffe 9Version: 2.2.0
a29d85f5 10Release: 6
901927d3
AM
11Epoch: 1
12License: BSD
13Group: Libraries
95daeb66 14Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
1376dffe 15# Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b
16Patch0: %{name}-multilib.patch
17Patch1: %{name}-cflags.patch
18Patch2: %{name}-link.patch
0c2d6b7d
JB
19URL: http://opencv.willowgarage.com/
20BuildRequires: OpenEXR-devel
21BuildRequires: cmake >= 2.4
22BuildRequires: doxygen
901927d3 23BuildRequires: ffmpeg-devel
0c2d6b7d
JB
24%if %{with gstreamer}
25BuildRequires: gstreamer-devel >= 0.10
26BuildRequires: gstreamer-plugins-base-devel >= 0.10
27%endif
901927d3 28BuildRequires: jasper-devel
0c2d6b7d 29BuildRequires: gtk+2-devel
901927d3
AM
30BuildRequires: libdc1394-devel
31BuildRequires: libjpeg-devel
32BuildRequires: libpng-devel
33BuildRequires: libraw1394-devel
0c2d6b7d 34BuildRequires: libstdc++-devel
901927d3 35BuildRequires: libtiff-devel
148338c5 36BuildRequires: libtool
0c2d6b7d 37BuildRequires: libv4l-devel
af6d2888 38BuildRequires: pkgconfig
901927d3 39BuildRequires: python-devel
0c2d6b7d 40BuildRequires: python-numpy-devel
901927d3 41BuildRequires: rpm-pythonprov
1376dffe 42BuildRequires: rpmbuild(macros) >= 1.577
43BuildRequires: sed >= 4.0
996927aa 44BuildRequires: swig-python
901927d3 45BuildRequires: zlib-devel
901927d3 46%{?with_xine:BuildRequires: xine-lib-devel}
0c2d6b7d
JB
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)
901927d3
AM
56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
cc676705 58%define skip_post_check_so libhighgui.so.%{version}
59
901927d3
AM
60%description
61OpenCV (Open Source Computer Vision) is a library of programming
62functions mainly aimed at real time computer vision.
63
0c2d6b7d
JB
64Example 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
76OpenCV (Open Source Computer Vision) to biblioteka funkcji
77przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.
78
79Przykł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.
901927d3
AM
89
90%package devel
0c2d6b7d
JB
91Summary: Header files for OpenCV library
92Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenCV
901927d3
AM
93Group: Development/Libraries
94Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 95Obsoletes: opencv-static
901927d3
AM
96
97%description devel
0c2d6b7d 98Header files for OpenCV library.
901927d3 99
0c2d6b7d
JB
100%description devel -l pl.UTF-8
101Pliki nagłówkowe biblioteki OpenCV.
901927d3
AM
102
103%package -n python-opencv
104Summary: OpenCV Python bindings
0c2d6b7d
JB
105Summary(pl.UTF-8): Wiązania Pythona do OpenCV
106Group: Libraries/Python
cd1f0136 107Requires: %{name} = %{epoch}:%{version}-%{release}
0c2d6b7d 108%pyrequires_eq python-libs
901927d3
AM
109
110%description -n python-opencv
111OpenCV Python bindings.
112
0c2d6b7d
JB
113%description -n python-opencv -l pl.UTF-8
114Wiązania Pythona do OpenCV.
115
901927d3 116%prep
95daeb66 117%setup -q -n OpenCV-%{version}
54551f29 118
da67222a 119%undos CMakeLists.txt
1376dffe 120%undos modules/gpu/CMakeLists.txt
54551f29 121
1376dffe 122%patch0 -p1
123%patch1 -p1
29d82ddf 124%patch2 -p1
148338c5 125
901927d3 126%build
95daeb66
AM
127install -d build
128cd build
0c2d6b7d 129%cmake .. \
8b9f61f7
JB
130 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
131 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
132%ifarch pentium4 %{x8664}
133 -DENABLE_SSE=ON \
95daeb66 134 -DENABLE_SSE2=ON \
8b9f61f7
JB
135%else
136 -DENABLE_SSE=OFF \
137 -DENABLE_SSE2=OFF \
95daeb66
AM
138%endif
139 -DBUILD_NEW_PYTHON_SUPPORT=ON \
8b9f61f7 140 -DUSE_O3=OFF \
95daeb66
AM
141 -DWITH_1394=ON \
142 -DWITH_FFMPEG=ON \
8b9f61f7 143 -DWITH_GSTREAMER=OFF \
95daeb66 144 -DWITH_GTK=ON \
8b9f61f7
JB
145 -DWITH_V4L=ON \
146%if %{with xine}
147 -DWITH_XINE=ON
148%endif
54551f29 149
8b9f61f7 150%{__make}
901927d3
AM
151
152%install
153rm -rf $RPM_BUILD_ROOT
154
95daeb66 155%{__make} -C build install \
901927d3
AM
156 DESTDIR=$RPM_BUILD_ROOT
157
4bd2eae7
AM
158install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
159install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
160
a29d85f5 161%if "%{_lib}" == "lib64"
9175d525
AM
162# upstream has no lib64 support
163mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
164%endif
165
901927d3
AM
166%clean
167rm -rf $RPM_BUILD_ROOT
168
169%post -p /sbin/ldconfig
170%postun -p /sbin/ldconfig
171
172%files
173%defattr(644,root,root,755)
0c2d6b7d
JB
174%attr(755,root,root) %{_bindir}/opencv_*
175%attr(755,root,root) %{_libdir}/libopencv_*.so.*.*.*
176%attr(755,root,root) %ghost %{_libdir}/libopencv_*.so.2.2
4bd2eae7 177%dir %{_datadir}/opencv
0c2d6b7d 178%doc %{_datadir}/opencv/doc
4bd2eae7
AM
179%{_datadir}/opencv/haarcascades
180%{_datadir}/opencv/lbpcascades
901927d3
AM
181
182%files devel
183%defattr(644,root,root,755)
0c2d6b7d 184%attr(755,root,root) %{_libdir}/libopencv_*.so
901927d3 185%{_includedir}/opencv
509c07dc 186%{_includedir}/opencv2
4bd2eae7 187%{_datadir}/opencv/OpenCVConfig.cmake
0c2d6b7d 188%{_pkgconfigdir}/opencv.pc
901927d3
AM
189
190%files -n python-opencv
191%defattr(644,root,root,755)
4bd2eae7 192%attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.061861 seconds and 4 git commands to generate.