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