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