]> git.pld-linux.org Git - packages/opencv.git/blob - opencv.spec
28dc74a182b9446ea7acad20ba6dcbda83702235
[packages/opencv.git] / opencv.spec
1 #
2 # TODO: re-enable static libs
3 #
4 %bcond_with     xine
5 Summary:        A library of programming functions mainly aimed at real time computer vision
6 Name:           opencv
7 Version:        2.2.0
8 Release:        1
9 Epoch:          1
10 License:        BSD
11 Group:          Libraries
12 Source0:        http://downloads.sourceforge.net/opencvlibrary/OpenCV-%{version}.tar.bz2
13 # Source0-md5:  122c9ac793a46854ef2819fedbbd6b1b
14 Patch0:         %{name}-multilib.patch
15 Patch1:         %{name}-cflags.patch
16 Patch2:         %{name}-link.patch
17 URL:            http://opencv.willowgarage.com
18 BuildRequires:  cmake
19 BuildRequires:  ffmpeg-devel
20 BuildRequires:  jasper-devel
21 BuildRequires:  libdc1394-devel
22 BuildRequires:  libjpeg-devel
23 BuildRequires:  libpng-devel
24 BuildRequires:  libraw1394-devel
25 BuildRequires:  libtiff-devel
26 BuildRequires:  libtool
27 BuildRequires:  pkgconfig
28 BuildRequires:  python-devel
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.577
31 BuildRequires:  sed >= 4.0
32 BuildRequires:  swig-python
33 BuildRequires:  zlib-devel
34 %pyrequires_eq  python-libs
35 %{?with_xine:BuildRequires:     xine-lib-devel}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         skip_post_check_so      libhighgui.so.%{version}
39
40 %description
41 OpenCV (Open Source Computer Vision) is a library of programming
42 functions mainly aimed at real time computer vision.
43
44 Example applications of the OpenCV library are Human-Computer
45 Interaction (HCI); Object Identification, Segmentation and
46 Recognition; Face Recognition; Gesture Recognition; Motion Tracking,
47 Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo
48 and Multi-Camera Calibration and Depth Computation; Mobile Robotics.
49
50 %package devel
51 Summary:        Header files and develpment documentation for opencv
52 Group:          Development/Libraries
53 Requires:       %{name} = %{epoch}:%{version}-%{release}
54
55 %description devel
56 Header files and opencv documentation.
57
58 %package static
59 Summary:        Static opencv library
60 Group:          Development/Libraries
61 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
62
63 %description static
64 This package contains the static library used for development.
65
66 %package -n python-opencv
67 Summary:        OpenCV Python bindings
68 Group:          Development/Languages/Python
69 %pyrequires_eq  python
70 Requires:       %{name} = %{epoch}:%{version}-%{release}
71
72 %description -n python-opencv
73 OpenCV Python bindings.
74
75 %prep
76 %setup -q -n OpenCV-%{version}
77
78 %undos modules/gpu/CMakeLists.txt
79
80 %patch0 -p1
81 %patch1 -p1
82 %patch2 -p1
83
84 %build
85 install -d build
86 cd build
87 %cmake \
88 %ifarch i686 pentium4 athlon %{x8664}
89         -DENABLE_SSE2=ON \
90 %endif
91         -DBUILD_NEW_PYTHON_SUPPORT=ON \
92 %if %{with xine}
93         -DWITH_XINE=ON \
94 %endif
95         -DWITH_GSTREAMER=OFF \
96         -DWITH_1394=ON \
97         -DWITH_FFMPEG=ON \
98         -DWITH_GTK=ON \
99         -DWITH_V4L=ON \
100         ../
101
102 %{__make} \
103         VERBOSE=1
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 %{__make} -C build install \
109         DESTDIR=$RPM_BUILD_ROOT
110
111 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
112 install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_bindir}/*
123 %attr(755,root,root) %{_libdir}/lib*so.*.*
124 %dir %{_datadir}/opencv
125 %{_datadir}/opencv/doc
126 %{_datadir}/opencv/haarcascades
127 %{_datadir}/opencv/lbpcascades
128
129 %files devel
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_libdir}/lib*.so
132 %{_includedir}/opencv
133 %{_datadir}/opencv/OpenCVConfig.cmake
134 %{_pkgconfigdir}/*.pc
135
136 #%files static
137 #%defattr(644,root,root,755)
138 #%{_libdir}/lib*.a
139
140 %files -n python-opencv
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{py_sitedir}/cv.so
This page took 0.098738 seconds and 3 git commands to generate.