]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
- BR: pkgconfig
[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:  pkgconfig
27 BuildRequires:  python-devel
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  swig-python
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
65 Requires:       %{name} = %{epoch}:%{version}-%{release}
66
67 %description -n python-opencv
68 OpenCV Python bindings.
69
70 %prep
71 %setup -q -n %{name}-%{version}.0
72 %patch0 -p0
73 %patch1 -p1
74 %patch2 -p1
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
79
80 %build
81 %{__libtoolize}
82 %{__aclocal} -I autotools/aclocal
83 %{__autoconf}
84 %{__automake}
85 %configure \
86 %ifarch i686 pentium4 athlon %{x8664}
87         --enable-sse2 \
88 %else
89         --disable-sse2 \
90 %endif
91         --with-python \
92         --with%{!?with_xine:out}-xine \
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]
This page took 0.048639 seconds and 4 git commands to generate.