]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- based on opencf-2.1.0-multilib.patch and adjusted for 2.2.0 version
[packages/opencv.git] / opencv.spec
CommitLineData
a8d52c2e 1#
2# TODO: re-enable static libs
3#
901927d3 4%bcond_with xine
901927d3
AM
5Summary: A library of programming functions mainly aimed at real time computer vision
6Name: opencv
1376dffe 7Version: 2.2.0
8Release: 1
901927d3
AM
9Epoch: 1
10License: BSD
11Group: Libraries
95daeb66 12Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
1376dffe 13# Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b
14Patch0: %{name}-multilib.patch
15Patch1: %{name}-cflags.patch
16Patch2: %{name}-link.patch
901927d3 17URL: http://opencv.willowgarage.com
95daeb66 18BuildRequires: cmake
901927d3
AM
19BuildRequires: ffmpeg-devel
20BuildRequires: jasper-devel
21BuildRequires: libdc1394-devel
22BuildRequires: libjpeg-devel
23BuildRequires: libpng-devel
24BuildRequires: libraw1394-devel
25BuildRequires: libtiff-devel
148338c5 26BuildRequires: libtool
af6d2888 27BuildRequires: pkgconfig
901927d3
AM
28BuildRequires: python-devel
29BuildRequires: rpm-pythonprov
1376dffe 30BuildRequires: rpmbuild(macros) >= 1.577
31BuildRequires: sed >= 4.0
996927aa 32BuildRequires: swig-python
901927d3
AM
33BuildRequires: zlib-devel
34%pyrequires_eq python-libs
35%{?with_xine:BuildRequires: xine-lib-devel}
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
cc676705 38%define skip_post_check_so libhighgui.so.%{version}
39
901927d3
AM
40%description
41OpenCV (Open Source Computer Vision) is a library of programming
42functions mainly aimed at real time computer vision.
43
44Example applications of the OpenCV library are Human-Computer
45Interaction (HCI); Object Identification, Segmentation and
46Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
47Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
48and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
49
50%package devel
51Summary: Header files and develpment documentation for opencv
52Group: Development/Libraries
53Requires: %{name} = %{epoch}:%{version}-%{release}
54
55%description devel
56Header files and opencv documentation.
57
58%package static
59Summary: Static opencv library
60Group: Development/Libraries
61Requires: %{name}-devel = %{epoch}:%{version}-%{release}
62
63%description static
64This package contains the static library used for development.
65
66%package -n python-opencv
67Summary: OpenCV Python bindings
68Group: Development/Languages/Python
69%pyrequires_eq python
cd1f0136 70Requires: %{name} = %{epoch}:%{version}-%{release}
901927d3
AM
71
72%description -n python-opencv
73OpenCV Python bindings.
74
75%prep
95daeb66 76%setup -q -n OpenCV-%{version}
54551f29 77
1376dffe 78%undos modules/gpu/CMakeLists.txt
54551f29 79
1376dffe 80%patch0 -p1
81%patch1 -p1
29d82ddf 82%patch2 -p1
148338c5 83
901927d3 84%build
95daeb66
AM
85install -d build
86cd build
87%cmake \
901927d3 88%ifarch i686 pentium4 athlon %{x8664}
95daeb66
AM
89 -DENABLE_SSE2=ON \
90%endif
91 -DBUILD_NEW_PYTHON_SUPPORT=ON \
92%if %{with xine}
93 -DWITH_XINE=ON \
94%endif
95 -DWITH_GSTREAMER=OFF \
96 -DWITH_1394=ON \
97 -DWITH_FFMPEG=ON \
98 -DWITH_GTK=ON \
4bd2eae7 99 -DWITH_V4L=ON \
95daeb66 100 ../
54551f29 101
95daeb66
AM
102%{__make} \
103 VERBOSE=1
901927d3
AM
104
105%install
106rm -rf $RPM_BUILD_ROOT
107
95daeb66 108%{__make} -C build install \
901927d3
AM
109 DESTDIR=$RPM_BUILD_ROOT
110
4bd2eae7
AM
111install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
112install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
113
901927d3
AM
114%clean
115rm -rf $RPM_BUILD_ROOT
116
117%post -p /sbin/ldconfig
118%postun -p /sbin/ldconfig
119
120%files
121%defattr(644,root,root,755)
901927d3
AM
122%attr(755,root,root) %{_bindir}/*
123%attr(755,root,root) %{_libdir}/lib*so.*.*
4bd2eae7
AM
124%dir %{_datadir}/opencv
125%{_datadir}/opencv/doc
126%{_datadir}/opencv/haarcascades
127%{_datadir}/opencv/lbpcascades
901927d3
AM
128
129%files devel
130%defattr(644,root,root,755)
131%attr(755,root,root) %{_libdir}/lib*.so
901927d3 132%{_includedir}/opencv
4bd2eae7 133%{_datadir}/opencv/OpenCVConfig.cmake
901927d3
AM
134%{_pkgconfigdir}/*.pc
135
4bd2eae7
AM
136#%files static
137#%defattr(644,root,root,755)
138#%{_libdir}/lib*.a
901927d3
AM
139
140%files -n python-opencv
141%defattr(644,root,root,755)
4bd2eae7 142%attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.08765 seconds and 4 git commands to generate.