Repackage license files
[platform/upstream/opencv.git] / packaging / opencv.spec
1 Name: opencv
2 VCS:  #e3ca2f3bdcac02e9780c2de7001310a2a61a483e-dirty
3 Summary: OpenCV library
4 Version: 2.4.9
5 Release: 9
6 Group: Development/Libraries
7 License: BSD-2.0 and LGPL-2.1+
8 Source0: %{name}-%{version}.tar.gz
9
10 BuildRequires:  cmake
11 BuildRequires:  pkg-config
12 BuildRequires:  libjpeg-devel
13 BuildRequires:  libpng-devel
14 BuildRequires:  libtiff-devel
15 #BuildRequires:  gettext-tools
16 #BuildRequires:  edje-tools
17 #BuildRequires:  eet-tools
18 #BuildRequires:  eina-devel
19 #BuildRequires:  eet-devel
20 #BuildRequires:  evas-devel
21 #BuildRequires:  ecore-devel
22 #BuildRequires:  edje-devel
23 #BuildRequires:  edbus-devel
24 #BuildRequires:  efreet-devel
25 #BuildRequires:  ethumb-devel
26 #BuildRequires:  emotion-devel
27 #BuildRequires:  app-svc-devel
28 #BuildRequires:  libx11-devel
29 BuildRequires:  elementary-devel
30 BuildRequires:  gstreamer
31 BuildRequires:  gst-plugins-base
32 BuildRequires:  gst-plugins-good
33 BuildRequires:  libavutil-devel
34 BuildRequires:  libavcodec-devel
35 BuildRequires:  libavformat-devel
36 BuildRequires:  libswscale-devel
37 #BuildRequires:  gst-ffmpeg
38 Requires(post):  /sbin/ldconfig
39 Requires(postun): /sbin/ldconfig
40
41 %description
42 The Open Computer Vision Library includes various algorithms for computer vision problems.
43
44 %package devel
45 Summary:    OpenCV Library (Dev)
46 Group:      Development/Libraries
47 Requires:    %{name} = %{version}-%{release}
48
49 %description devel
50 The Open Computer Vision Library (Dev) includes various algorithms for computer vision problems.
51
52 %prep
53 %setup -q
54
55 %build
56 %ifarch aarch64 x86_64
57 ARCH=aarch64
58 %else
59 ARCH=arm
60 %endif
61
62 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
63     -DARCH=${ARCH} \
64         -DCMAKE_BUILD_TYPE=Release \
65         -DCMAKE_CONFIGURATION_TYPES=Release \
66         -DBUILD_DOCS=OFF \
67         -DBUILD_PACKAGE=OFF \
68         -DBUILD_ANDROID_SERVICE=OFF \
69         -DBUILD_ANDRIOD_PACKAGE=OFF \
70         -DBUILD_SHARED_LIBS=ON \
71         -DBUILD_JASPER=OFF \
72         -DBUILD_JPEG=OFF \
73         -DBUILD_PERF_TESTS=OFF \
74         -DBUILD_PNG=OFF \
75         -DBUILD_TESTS=OFF \
76         -DBUILD_TIFF=OFF \
77         -DBUILD_WITH_DEBUG_INFO=ON \
78         -DBUILD_ZLIB=OFF \
79         -DBUILD_OPENEXR=OFF \
80         -DBUILD_TBB=OFF \
81         -DBUILD_EXAMPLES=OFF \
82         -DBUILD_opencv_apps=OFF \
83         -DBUILD_opencv_calib3d=ON \
84         -DBUILD_opencv_contrib=ON \
85         -DBUILD_opencv_core=ON \
86         -DBUILD_opencv_imgproc=ON \
87         -DBUILD_opencv_flann=ON \
88         -DBUILD_opencv_features2d=ON \
89         -DBUILD_opencv_objdetect=ON \
90         -DBUILD_opencv_ml=ON \
91         -DBUILD_opencv_gpu=OFF \
92         -DBUILD_opencv_highgui=ON \
93         -DBUILD_opencv_legacy=ON \
94         -DBUILD_opencv_nonfree=OFF \
95         -DBUILD_opencv_ocl=OFF \
96         -DBUILD_opencv_photo=ON \
97         -DBUILD_opencv_stitching=OFF \
98         -DBUILD_opencv_superres=OFF \
99         -DBUILD_opencv_ts=OFF \
100         -DBUILD_opencv_video=ON \
101         -DBUILD_opencv_videostab=OFF \
102         -DBUILD_opencv_world=OFF \
103         -DWITH_1394=OFF \
104         -DWITH_CSTRIPES=OFF \
105         -DWITH_CUBLAS=OFF \
106         -DWITH_CUDA=OFF \
107         -DWITH_CUFFT=OFF \
108         -DWITH_DSHOW=OFF \
109         -DWITH_EIGEN=OFF \
110         -DWITH_FFMPEG=ON \
111         -DWITH_GIGEAPI=OFF \
112         -DWITH_INTELPERC=OFF \
113         -DWITH_IPP=OFF \
114         -DWITH_JASPER=OFF \
115         -DWITH_MSMF=OFF \
116         -DWITH_NVCUVID=OFF \
117         -DWITH_OPENCL=OFF \
118         -DWITH_OPENCLAMDBLAS=OFF \
119         -DWITH_OPENCLAMDFFT=OFF \
120         -DWITH_OPENEXR=OFF \
121         -DWITH_OPENGL=ON \
122         -DWITH_OPENMP=OFF \
123         -DWITH_OPENNI=OFF \
124         -DWITH_PNG=ON \
125         -DWITH_PVAPI=OFF \
126         -DWITH_QT=OFF \
127         -DWITH_TBB=OFF \
128         -DWITH_TIFF=ON \
129         -DWITH_VFW=OFF \
130         -DWITH_VTK=OFF \
131         -DWITH_WIN32UI=OFF \
132         -DWITH_XIMEA=OFF \
133         -DWITH_GSTREAMER=ON \
134         -DWITH_V4L=ON \
135         -DWITH_GTK=ON \
136         -DINSTALL_C_EXAMPLES=OFF \
137         -DINSTALL_PYTHON_EXAMPLES=OFF \
138         -DINSTALL_TESTS=OFF \
139         -DINTALL_ANDROID_EXAMPLES=OFF \
140         -DENABLE_PRECOMPILED_HEADERS=OFF \
141         -DENABLE_DYNAMIC_CUDA=OFF \
142         -DENABLE_SOLUTION_FOLDERS=OFF \
143         -DENABLE_PROFILLING=OFF \
144         -DENABLE_COVERAGE=OFF
145
146 make %{?jobs:-j%jobs}
147
148 %install
149 rm -rf %{buildroot}
150 mkdir -p %{buildroot}%{_datadir}/license
151 cp LICENSE %{buildroot}%{_datadir}/license/%{name}
152 cat LICENSE.LGPL-2.1+ >> %{buildroot}%{_datadir}/license/%{name}
153 %make_install
154
155
156 %clean
157 rm -rf %{buildroot}
158
159 %post
160 /sbin/ldconfig
161
162 %postun
163 /sbin/ldconfig
164
165 %files
166 %manifest opencv.manifest
167 %defattr(-,root,root,-)
168 %{_libdir}/*.so.*
169 %{_datadir}/license/*
170 /usr/share/*
171
172 %files devel
173 /usr/include/*
174 %{_libdir}/pkgconfig/*.pc
175 %{_libdir}/*.so
176
177 %doc