]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
d205e8d0347e46e9462a029b46dc35c1b6752f33
[packages/opencv.git] / opencv.spec
1 %bcond_with     xine
2 Summary:        A library of programming functions mainly aimed at real time computer vision
3 Name:           opencv
4 Version:        2.1.0
5 Release:        0.1
6 Epoch:          1
7 License:        BSD
8 Group:          Libraries
9 Source0:        http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
10 # Source0-md5:  1d71584fb4e04214c0085108f95e24c8
11 Patch0:         %{name}-2.0.0-libpng14.patch
12 Patch1:         %{name}-2.1.0-mmap.patch
13 Patch2:         %{name}-2.1.0-multilib.patch
14 URL:            http://opencv.willowgarage.com
15 BuildRequires:  cmake
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:  pkgconfig
25 BuildRequires:  python-devel
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  swig-python
28 BuildRequires:  zlib-devel
29 %pyrequires_eq  python-libs
30 %{?with_xine:BuildRequires:     xine-lib-devel}
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 OpenCV (Open Source Computer Vision) is a library of programming
35 functions mainly aimed at real time computer vision.
36
37 Example applications of the OpenCV library are Human-Computer
38 Interaction (HCI); Object Identification, Segmentation and
39 Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
40 Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
41 and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
42
43 %package devel
44 Summary:        Header files and develpment documentation for opencv
45 Group:          Development/Libraries
46 Requires:       %{name} = %{epoch}:%{version}-%{release}
47
48 %description devel
49 Header files and opencv documentation.
50
51 %package static
52 Summary:        Static opencv library
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
55
56 %description static
57 This package contains the static library used for development.
58
59 %package -n python-opencv
60 Summary:        OpenCV Python bindings
61 Group:          Development/Languages/Python
62 %pyrequires_eq  python
63 Requires:       %{name} = %{epoch}:%{version}-%{release}
64
65 %description -n python-opencv
66 OpenCV Python bindings.
67
68 %prep
69 %setup -q -n OpenCV-%{version}
70 %patch0 -p0
71 %patch1 -p0
72 %patch2 -p1
73
74 %build
75 install -d build
76 cd build
77 %cmake \
78         -DCXXFLAGS="-D__STDC_CONSTANT_MACROS" \
79 %ifarch i686 pentium4 athlon %{x8664}
80         -DENABLE_SSE2=ON \
81 %endif
82         -DBUILD_NEW_PYTHON_SUPPORT=ON \
83 %if %{with xine}
84         -DWITH_XINE=ON \
85 %endif
86         -DWITH_GSTREAMER=OFF \
87         -DWITH_1394=ON \
88         -DWITH_FFMPEG=ON \
89         -DWITH_GTK=ON \
90         -DWITH_V4L=PN \
91 %if "%{_lib}" == "lib64"
92                 -DLIB_SUFFIX=64 \
93 %endif
94         ../
95 %{__make} \
96         VERBOSE=1
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} -C build install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post   -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS COPYING ChangeLog THANKS TODO
113 %doc docs/*.{htm,rtf,png,txt} docs/papers docs/ref
114 %attr(755,root,root) %{_bindir}/*
115 %attr(755,root,root) %{_libdir}/lib*so.*.*
116 %attr(755,root,root) %ghost %{_libdir}/lib*.so.2
117
118 %files devel
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/lib*.so
121 %{_libdir}/lib*.la
122 %{_includedir}/opencv
123 %{_pkgconfigdir}/*.pc
124
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/lib*.a
128
129 %files -n python-opencv
130 %defattr(644,root,root,755)
131 %dir %{py_sitedir}/opencv
132 %attr(755,root,root) %{py_sitedir}/opencv/*.so
133 %{py_sitedir}/opencv/*.py[co]
This page took 0.213462 seconds and 2 git commands to generate.