]>
Commit | Line | Data |
---|---|---|
901927d3 AM |
1 | %bcond_with xine |
2 | %define snap pre1 | |
3 | Summary: A library of programming functions mainly aimed at real time computer vision | |
4 | Name: opencv | |
5 | Version: 1.1 | |
f2bcabd6 | 6 | Release: 0.%{snap}.6 |
901927d3 AM |
7 | Epoch: 1 |
8 | License: BSD | |
9 | Group: Libraries | |
10 | Source0: http://dl.sourceforge.net/opencvlibrary/%{name}-%{version}%{snap}.tar.gz | |
11 | # Source0-md5: b147b7cd3c059831c415c5a2bcecdf95 | |
148338c5 | 12 | Patch0: %{name}-ffmpeg.patch |
4b75cbf1 | 13 | Patch1: %{name}-am.patch |
29d82ddf | 14 | Patch2: %{name}-build.patch |
901927d3 AM |
15 | URL: http://opencv.willowgarage.com |
16 | BuildRequires: autoconf >= 2.53 | |
17 | BuildRequires: automake | |
18 | BuildRequires: ffmpeg-devel | |
19 | BuildRequires: jasper-devel | |
20 | BuildRequires: libdc1394-devel | |
21 | BuildRequires: libjpeg-devel | |
22 | BuildRequires: libpng-devel | |
23 | BuildRequires: libraw1394-devel | |
24 | BuildRequires: libtiff-devel | |
148338c5 | 25 | BuildRequires: libtool |
af6d2888 | 26 | BuildRequires: pkgconfig |
901927d3 AM |
27 | BuildRequires: python-devel |
28 | BuildRequires: rpm-pythonprov | |
996927aa | 29 | BuildRequires: swig-python |
901927d3 AM |
30 | BuildRequires: zlib-devel |
31 | %pyrequires_eq python-libs | |
32 | %{?with_xine:BuildRequires: xine-lib-devel} | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | OpenCV (Open Source Computer Vision) is a library of programming | |
37 | functions mainly aimed at real time computer vision. | |
38 | ||
39 | Example applications of the OpenCV library are Human-Computer | |
40 | Interaction (HCI); Object Identification, Segmentation and | |
41 | Recognition; Face Recognition; Gesture Recognition; Motion Tracking, | |
42 | Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo | |
43 | and Multi-Camera Calibration and Depth Computation; Mobile Robotics. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files and develpment documentation for opencv | |
47 | Group: Development/Libraries | |
48 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
49 | ||
50 | %description devel | |
51 | Header files and opencv documentation. | |
52 | ||
53 | %package static | |
54 | Summary: Static opencv library | |
55 | Group: Development/Libraries | |
56 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
57 | ||
58 | %description static | |
59 | This package contains the static library used for development. | |
60 | ||
61 | %package -n python-opencv | |
62 | Summary: OpenCV Python bindings | |
63 | Group: Development/Languages/Python | |
64 | %pyrequires_eq python | |
cd1f0136 | 65 | Requires: %{name} = %{epoch}:%{version}-%{release} |
901927d3 AM |
66 | |
67 | %description -n python-opencv | |
68 | OpenCV Python bindings. | |
69 | ||
70 | %prep | |
71 | %setup -q -n %{name}-%{version}.0 | |
148338c5 | 72 | %patch0 -p0 |
4b75cbf1 | 73 | %patch1 -p1 |
29d82ddf | 74 | %patch2 -p1 |
148338c5 AM |
75 | |
76 | sed -i -e 's#ACLOCAL_AMFLAGS.*##g' Makefile.am | |
77 | sed -i -e 's#pkgpython#pkgpyexec#g' interfaces/swig/python/Makefile.am | |
78 | sed -i -e 's#-L$(SWIG_PYTHON_LIBS)#$(NOTING_NOT_EMPTY_LINE)#g' interfaces/swig/python/Makefile.am | |
901927d3 AM |
79 | |
80 | %build | |
148338c5 AM |
81 | %{__libtoolize} |
82 | %{__aclocal} -I autotools/aclocal | |
83 | %{__autoconf} | |
84 | %{__automake} | |
901927d3 AM |
85 | %configure \ |
86 | %ifarch i686 pentium4 athlon %{x8664} | |
87 | --enable-sse2 \ | |
88 | %else | |
89 | --disable-sse2 \ | |
90 | %endif | |
91 | --with-python \ | |
148338c5 | 92 | --with%{!?with_xine:out}-xine \ |
901927d3 AM |
93 | --with-ffmpeg \ |
94 | --with-1394libs \ | |
95 | --with-v4l \ | |
96 | --with-gtk \ | |
97 | --without-gstreamer \ | |
98 | --without-quicktime | |
99 | %{__make} | |
100 | ||
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %{__make} install \ | |
105 | DESTDIR=$RPM_BUILD_ROOT | |
106 | ||
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post -p /sbin/ldconfig | |
111 | %postun -p /sbin/ldconfig | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS COPYING ChangeLog THANKS TODO | |
116 | %doc docs/*.{htm,rtf,png,txt} docs/papers docs/ref | |
117 | %attr(755,root,root) %{_bindir}/* | |
118 | %attr(755,root,root) %{_libdir}/lib*so.*.* | |
119 | %attr(755,root,root) %ghost %{_libdir}/lib*.so.2 | |
120 | ||
121 | %files devel | |
122 | %defattr(644,root,root,755) | |
123 | %attr(755,root,root) %{_libdir}/lib*.so | |
124 | %{_libdir}/lib*.la | |
125 | %{_includedir}/opencv | |
126 | %{_pkgconfigdir}/*.pc | |
127 | ||
128 | %files static | |
129 | %defattr(644,root,root,755) | |
130 | %{_libdir}/lib*.a | |
131 | ||
132 | %files -n python-opencv | |
133 | %defattr(644,root,root,755) | |
134 | %dir %{py_sitedir}/opencv | |
135 | %attr(755,root,root) %{py_sitedir}/opencv/*.so | |
136 | %{py_sitedir}/opencv/*.py[co] |