]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
- build with -D__STDC_CONSTANT_MACROS flag to avoid errors (-cflags.patch)
[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 Patch3:         %{name}-cflags.patch
15 URL:            http://opencv.willowgarage.com
16 BuildRequires:  cmake
17 BuildRequires:  ffmpeg-devel
18 BuildRequires:  jasper-devel
19 BuildRequires:  libdc1394-devel
20 BuildRequires:  libjpeg-devel
21 BuildRequires:  libpng-devel
22 BuildRequires:  libraw1394-devel
23 BuildRequires:  libtiff-devel
24 BuildRequires:  libtool
25 BuildRequires:  pkgconfig
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 OpenCV-%{version}
71
72 %undos src/ml/CMakeLists.txt
73 %undos CMakeLists.txt
74 %undos src/cv/CMakeLists.txt
75 %undos src/cxcore/CMakeLists.txt
76
77 %patch0 -p0
78 %patch1 -p0
79 %patch2 -p1
80 %patch3 -p1
81
82 %build
83 install -d build
84 cd build
85 %cmake \
86 %ifarch i686 pentium4 athlon %{x8664}
87         -DENABLE_SSE2=ON \
88 %endif
89         -DBUILD_NEW_PYTHON_SUPPORT=ON \
90 %if %{with xine}
91         -DWITH_XINE=ON \
92 %endif
93         -DWITH_GSTREAMER=OFF \
94         -DWITH_1394=ON \
95         -DWITH_FFMPEG=ON \
96         -DWITH_GTK=ON \
97         -DWITH_V4L=PN \
98 %if "%{_lib}" == "lib64"
99                 -DLIB_SUFFIX=64 \
100 %endif
101         ../
102
103 %{__make} \
104         VERBOSE=1
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %{__make} -C build install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post   -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
117
118 %files
119 %defattr(644,root,root,755)
120 %doc AUTHORS COPYING ChangeLog THANKS TODO
121 %doc docs/*.{htm,rtf,png,txt} docs/papers docs/ref
122 %attr(755,root,root) %{_bindir}/*
123 %attr(755,root,root) %{_libdir}/lib*so.*.*
124 %attr(755,root,root) %ghost %{_libdir}/lib*.so.2
125
126 %files devel
127 %defattr(644,root,root,755)
128 %attr(755,root,root) %{_libdir}/lib*.so
129 %{_libdir}/lib*.la
130 %{_includedir}/opencv
131 %{_pkgconfigdir}/*.pc
132
133 %files static
134 %defattr(644,root,root,755)
135 %{_libdir}/lib*.a
136
137 %files -n python-opencv
138 %defattr(644,root,root,755)
139 %dir %{py_sitedir}/opencv
140 %attr(755,root,root) %{py_sitedir}/opencv/*.so
141 %{py_sitedir}/opencv/*.py[co]
This page took 0.056943 seconds and 3 git commands to generate.