]> git.pld-linux.org Git - packages/opencv.git/blame_incremental - opencv.spec
- rel 5; try to fix lib64
[packages/opencv.git] / opencv.spec
... / ...
CommitLineData
1#
2# TODO: re-enable static libs
3#
4%bcond_with xine
5Summary: A library of programming functions mainly aimed at real time computer vision
6Name: opencv
7Version: 2.2.0
8Release: 5
9Epoch: 1
10License: BSD
11Group: Libraries
12Source0: http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
13# Source0-md5: 122c9ac793a46854ef2819fedbbd6b1b
14Patch0: %{name}-multilib.patch
15Patch1: %{name}-cflags.patch
16Patch2: %{name}-link.patch
17URL: http://opencv.willowgarage.com
18BuildRequires: cmake
19BuildRequires: ffmpeg-devel
20BuildRequires: jasper-devel
21BuildRequires: libdc1394-devel
22BuildRequires: libjpeg-devel
23BuildRequires: libpng-devel
24BuildRequires: libraw1394-devel
25BuildRequires: libtiff-devel
26BuildRequires: libtool
27BuildRequires: pkgconfig
28BuildRequires: python-devel
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.577
31BuildRequires: sed >= 4.0
32BuildRequires: swig-python
33BuildRequires: zlib-devel
34%pyrequires_eq python-libs
35%{?with_xine:BuildRequires: xine-lib-devel}
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%define skip_post_check_so libhighgui.so.%{version}
39
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
70Requires: %{name} = %{epoch}:%{version}-%{release}
71
72%description -n python-opencv
73OpenCV Python bindings.
74
75%prep
76%setup -q -n OpenCV-%{version}
77
78%undos CMakeLists.txt
79%undos modules/gpu/CMakeLists.txt
80
81%patch0 -p1
82%patch1 -p1
83%patch2 -p1
84
85%build
86install -d build
87cd build
88%cmake \
89%ifarch i686 pentium4 athlon %{x8664}
90 -DENABLE_SSE2=ON \
91%endif
92 -DBUILD_NEW_PYTHON_SUPPORT=ON \
93%if %{with xine}
94 -DWITH_XINE=ON \
95%endif
96 -DWITH_GSTREAMER=OFF \
97 -DWITH_1394=ON \
98 -DWITH_FFMPEG=ON \
99 -DWITH_GTK=ON \
100 -DWITH_V4L=ON \
101 ../
102
103%{__make} \
104 VERBOSE=1
105
106%install
107rm -rf $RPM_BUILD_ROOT
108
109%{__make} -C build install \
110 DESTDIR=$RPM_BUILD_ROOT
111
112install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
113install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
114
115%if %{_lib} = "lib64"
116# upstream has no lib64 support
117mv $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
118%endif
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%post -p /sbin/ldconfig
124%postun -p /sbin/ldconfig
125
126%files
127%defattr(644,root,root,755)
128%attr(755,root,root) %{_bindir}/*
129%attr(755,root,root) %{_libdir}/lib*so.*.*
130%dir %{_datadir}/opencv
131%{_datadir}/opencv/doc
132%{_datadir}/opencv/haarcascades
133%{_datadir}/opencv/lbpcascades
134
135%files devel
136%defattr(644,root,root,755)
137%attr(755,root,root) %{_libdir}/lib*.so
138%{_includedir}/opencv
139%{_includedir}/opencv2
140%{_datadir}/opencv/OpenCVConfig.cmake
141%{_pkgconfigdir}/*.pc
142
143#%files static
144#%defattr(644,root,root,755)
145#%{_libdir}/lib*.a
146
147%files -n python-opencv
148%defattr(644,root,root,755)
149%attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.170396 seconds and 4 git commands to generate.