]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
- rel .6
[packages/opencv.git] / opencv.spec
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
6 Release:        0.%{snap}.6
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
12 Patch0:         %{name}-ffmpeg.patch
13 Patch1:         %{name}-am.patch
14 Patch2:         %{name}-build.patch
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
25 BuildRequires:  libtool
26 BuildRequires:  python-devel
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  swig-python
29 BuildRequires:  zlib-devel
30 %pyrequires_eq  python-libs
31 %{?with_xine:BuildRequires:     xine-lib-devel}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 OpenCV (Open Source Computer Vision) is a library of programming
36 functions mainly aimed at real time computer vision.
37
38 Example applications of the OpenCV library are Human-Computer
39 Interaction (HCI); Object Identification, Segmentation and
40 Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
41 Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
42 and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
43
44 %package devel
45 Summary:        Header files and develpment documentation for opencv
46 Group:          Development/Libraries
47 Requires:       %{name} = %{epoch}:%{version}-%{release}
48
49 %description devel
50 Header files and opencv documentation.
51
52 %package static
53 Summary:        Static opencv library
54 Group:          Development/Libraries
55 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
56
57 %description static
58 This package contains the static library used for development.
59
60 %package -n python-opencv
61 Summary:        OpenCV Python bindings
62 Group:          Development/Languages/Python
63 %pyrequires_eq  python
64 Requires:       %{name} = %{epoch}:%{version}-%{release}
65
66 %description -n python-opencv
67 OpenCV Python bindings.
68
69 %prep
70 %setup -q -n %{name}-%{version}.0
71 %patch0 -p0
72 %patch1 -p1
73 %patch2 -p1
74
75 sed -i -e 's#ACLOCAL_AMFLAGS.*##g' Makefile.am
76 sed -i -e 's#pkgpython#pkgpyexec#g' interfaces/swig/python/Makefile.am
77 sed -i -e 's#-L$(SWIG_PYTHON_LIBS)#$(NOTING_NOT_EMPTY_LINE)#g' interfaces/swig/python/Makefile.am
78
79 %build
80 %{__libtoolize}
81 %{__aclocal} -I autotools/aclocal
82 %{__autoconf}
83 %{__automake}
84 %configure \
85 %ifarch i686 pentium4 athlon %{x8664}
86         --enable-sse2 \
87 %else
88         --disable-sse2 \
89 %endif
90         --with-python \
91         --with%{!?with_xine:out}-xine \
92         --with-ffmpeg \
93         --with-1394libs \
94         --with-v4l \
95         --with-gtk \
96         --without-gstreamer \
97         --without-quicktime
98 %{__make}
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %post   -p /sbin/ldconfig
110 %postun -p /sbin/ldconfig
111
112 %files
113 %defattr(644,root,root,755)
114 %doc AUTHORS COPYING ChangeLog THANKS TODO
115 %doc docs/*.{htm,rtf,png,txt} docs/papers docs/ref
116 %attr(755,root,root) %{_bindir}/*
117 %attr(755,root,root) %{_libdir}/lib*so.*.*
118 %attr(755,root,root) %ghost %{_libdir}/lib*.so.2
119
120 %files devel
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/lib*.so
123 %{_libdir}/lib*.la
124 %{_includedir}/opencv
125 %{_pkgconfigdir}/*.pc
126
127 %files static
128 %defattr(644,root,root,755)
129 %{_libdir}/lib*.a
130
131 %files -n python-opencv
132 %defattr(644,root,root,755)
133 %dir %{py_sitedir}/opencv
134 %attr(755,root,root) %{py_sitedir}/opencv/*.so
135 %{py_sitedir}/opencv/*.py[co]
This page took 0.144402 seconds and 4 git commands to generate.