]> git.pld-linux.org Git - packages/opencv.git/blame - opencv.spec
- added skip_post_check_so to allow build
[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
cc676705 8Release: 2
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
cc676705 37%define skip_post_check_so libhighgui.so.%{version}
38
901927d3
AM
39%description
40OpenCV (Open Source Computer Vision) is a library of programming
41functions mainly aimed at real time computer vision.
42
43Example applications of the OpenCV library are Human-Computer
44Interaction (HCI); Object Identification, Segmentation and
45Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
46Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
47and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
48
49%package devel
50Summary: Header files and develpment documentation for opencv
51Group: Development/Libraries
52Requires: %{name} = %{epoch}:%{version}-%{release}
53
54%description devel
55Header files and opencv documentation.
56
57%package static
58Summary: Static opencv library
59Group: Development/Libraries
60Requires: %{name}-devel = %{epoch}:%{version}-%{release}
61
62%description static
63This package contains the static library used for development.
64
65%package -n python-opencv
66Summary: OpenCV Python bindings
67Group: Development/Languages/Python
68%pyrequires_eq python
cd1f0136 69Requires: %{name} = %{epoch}:%{version}-%{release}
901927d3
AM
70
71%description -n python-opencv
72OpenCV Python bindings.
73
74%prep
95daeb66 75%setup -q -n OpenCV-%{version}
54551f29 76
77%undos src/ml/CMakeLists.txt
78%undos CMakeLists.txt
79%undos src/cv/CMakeLists.txt
80%undos src/cxcore/CMakeLists.txt
81
148338c5 82%patch0 -p0
95daeb66 83%patch1 -p0
29d82ddf 84%patch2 -p1
54551f29 85%patch3 -p1
148338c5 86
901927d3 87%build
95daeb66
AM
88install -d build
89cd build
90%cmake \
4bd2eae7 91 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
901927d3 92%ifarch i686 pentium4 athlon %{x8664}
95daeb66
AM
93 -DENABLE_SSE2=ON \
94%endif
95 -DBUILD_NEW_PYTHON_SUPPORT=ON \
96%if %{with xine}
97 -DWITH_XINE=ON \
98%endif
99 -DWITH_GSTREAMER=OFF \
100 -DWITH_1394=ON \
101 -DWITH_FFMPEG=ON \
102 -DWITH_GTK=ON \
4bd2eae7 103 -DWITH_V4L=ON \
95daeb66 104%if "%{_lib}" == "lib64"
4bd2eae7 105 -DLIB_SUFFIX=64 \
901927d3 106%endif
95daeb66 107 ../
54551f29 108
95daeb66
AM
109%{__make} \
110 VERBOSE=1
901927d3
AM
111
112%install
113rm -rf $RPM_BUILD_ROOT
114
95daeb66 115%{__make} -C build install \
901927d3
AM
116 DESTDIR=$RPM_BUILD_ROOT
117
4bd2eae7
AM
118install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
119install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
120
901927d3
AM
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%post -p /sbin/ldconfig
125%postun -p /sbin/ldconfig
126
127%files
128%defattr(644,root,root,755)
901927d3
AM
129%attr(755,root,root) %{_bindir}/*
130%attr(755,root,root) %{_libdir}/lib*so.*.*
4bd2eae7
AM
131%attr(755,root,root) %ghost %{_libdir}/lib*.so.2.1
132%dir %{_datadir}/opencv
133%{_datadir}/opencv/doc
134%{_datadir}/opencv/haarcascades
135%{_datadir}/opencv/lbpcascades
901927d3
AM
136
137%files devel
138%defattr(644,root,root,755)
139%attr(755,root,root) %{_libdir}/lib*.so
901927d3 140%{_includedir}/opencv
4bd2eae7 141%{_datadir}/opencv/OpenCVConfig.cmake
901927d3
AM
142%{_pkgconfigdir}/*.pc
143
4bd2eae7
AM
144#%files static
145#%defattr(644,root,root,755)
146#%{_libdir}/lib*.a
901927d3
AM
147
148%files -n python-opencv
149%defattr(644,root,root,755)
4bd2eae7 150%attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.048268 seconds and 4 git commands to generate.