Пакет libopencv2.4: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
%def_disable debug
%def_enable apps
%def_disable openmp
%def_without unicap
%def_with swig
%def_with python
%def_with xine
%def_without octave
%def_without gstreamer
%def_with ffmpeg
%def_with 1394libs
%def_with v4l
%def_with gtk
%def_with gthread
%def_without carbon
%def_without imageio
%def_without quicktime
%def_with pic
#----------------------------------------------------------------------
%define set_without() %{expand:%%force_without %{1}} %{expand:%%undefine _with_%{1}}

%{?_with_ffmpeg:%set_without gstreamer}
%{?_with_ffmpeg:%set_without quicktime}
%{?_with_xine:%set_without quicktime}
%{?_with_1394libs:%set_without quicktime}
%{?_with_v4l:%set_without quicktime}

%define bname opencv
%define Name OpenCV
%define sover 2.4
Name: lib%bname%sover
Version: 2.4.9
%define trunk 20130204
Release: alt5.git%trunk
Summary:  Intel(R) Open Source Computer Vision Library
License: Distributable
Group: System/Libraries
URL: http://opencv.org
# git://code.opencv.org/opencv.git
Source: %bname-%version.tar
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>

BuildPreReq: chrpath libavformat53 libavcodec53 libcvmser
BuildRequires: gcc-c++ libjasper-devel libjpeg-devel libtiff-devel
BuildRequires: openexr-devel graphviz libpng-devel libpixman-devel
BuildPreReq: cmake libnumpy-devel eigen3 doxygen zlib-devel
BuildPreReq: libucil-devel libv4l-devel libtbb-devel bzlib-devel
BuildPreReq: pkgconfig(glproto) pkgconfig(dri2proto) pkgconfig(xext)
BuildPreReq: pkgconfig(xdamage) pkgconfig(xxf86vm)
BuildPreReq: libGLU-devel libXau-devel libXdmcp-devel libgtkglext-devel
BuildPreReq: python-module-sphinx-devel python-module-Pygments
BuildPreReq: texlive-latex-base
%{?_enable_openmp:BuildRequires: libgomp-devel}
%{?_with_unicap:BuildRequires: libunicap-devel}
%{?_with_ffmpeg:BuildRequires: libavformat-devel libswscale-devel}
%{?_with_gstreamer:BuildRequires: gstreamer-devel}
%{?_with_gtk:BuildRequires: libgtk+2-devel}
%{?_with_xine:BuildRequires: libxine-devel}
%{?_with_python:BuildRequires: python-devel}
%{?_with_octave:BuildRequires: octave-devel}
%{?_with_swig:BuildRequires: swig}
%{?_with_1394libs:BuildRequires: libdc1394-devel}

%description
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.


%package -n lib%bname-devel
Group: Development/C++
Summary: Development files for %name
Requires: %name = %version-%release
Provides: lib%{bname}2.2-devel = %version-%release
Provides: lib%{bname}2-devel = %version-%release
Conflicts: lib%{bname}2.2-devel < %version-%release
Obsoletes: lib%{bname}2.2-devel < %version-%release
Conflicts: lib%bname-devel < %version-%release
Obsoletes: lib%bname-devel < %version-%release
Conflicts: lib%{bname}2-devel < %version-%release
Obsoletes: lib%{bname}2-devel < %version-%release

%description -n lib%bname-devel
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains header files and documentation needed to develop
applications with %name.


%package doc
Summary: %name documentation
Group: Development/Documentation
BuildArch: noarch

%description doc
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains API Reference for develop with %name.


%package tests
Group: Video
Summary: %Name tests
Requires: %name = %version-%release

%description tests
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains %Name tests applications.

%package utils
Group: Video
Summary: %Name utils
Provides: lib%bname-utils = %version-%release
Conflicts: lib%bname-utils < %version-%release
Obsoletes: lib%bname-utils < %version-%release
Provides: lib%{bname}2-utils = %version-%release
Conflicts: lib%{bname}2-utils < %version-%release
Obsoletes: lib%{bname}2-utils < %version-%release

%description utils
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains %Name demo applications.


%package -n python-module-%bname%sover
Group: Development/Python
Summary: Python modules for %Name
Provides: python-module-%bname = %version-%release
Conflicts: python-module-%bname < %version-%release
Obsoletes: python-module-%bname < %version-%release
Provides: python-module-%{bname}2 = %version-%release
Conflicts: python-module-%{bname}2 < %version-%release
Obsoletes: python-module-%{bname}2 < %version-%release
Conflicts: python-module-%{bname}2.3
Obsoletes: python-module-%{bname}2.3

%description -n python-module-%bname%sover
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains an extension module for python that provides a
Python language mapping for the %Name.

%package examples
Group: Video
Summary: %Name samples
BuildArch: noarch
Conflicts: lib%bname-examples
Conflicts: lib%{bname}2-examples

%description examples
%Name means Intel(R) Open Source Computer Vision Library. It is a
collection of C functions and a few C++ classes that implement many
popular Image Processing and Computer Vision algorithms.
%Name provides cross-platform middle-to-high level API that includes
about 300 C functions and a few C++ classes. Also there are constantly
improving Python bindings to %Name.

This package contains %Name examples.

%prep
%setup

rm -fR 3rdparty/{ffmpeg,lib,libjasper,libjpeg,libpng,libtiff,openexr,tbb,zlib}

for i in $(egrep -R cxtypes interfaces/swig/|awk -F : '{print $1}')
do
	sed -i 's|.*cxtypes.*||' $i
done
for i in $(egrep -R cvtypes interfaces/swig/|awk -F : '{print $1}')
do
	sed -i 's|.*cvtypes.*||' $i
done

rm -f interfaces/swig/python/_*.cpp interfaces/swig/python/cv.py \
	interfaces/swig/python/highgui.py interfaces/swig/python/ml.py
#rm -fR interfaces/swig/general

%prepare_sphinx .
cp -f doc/conf.py ./
cp doc/opencv-logo2.png ./

%build
SWIG_FEATURES="-I$PWD/include/opencv"
for i in core ml imgproc video features2d flann calib3d objdetect \
	legacy highgui photo
do
	SWIG_FEATURES="$SWIG_FEATURES -I$PWD/modules/$i/include"
done
export SWIG_FEATURES
%add_optflags $SWIG_FEATURES
cmake \
	-DCMAKE_INSTALL_PREFIX:PATH=%prefix \
	-DBUILD_PACKAGE:BOOL=ON \
	-DBUILD_TESTS:BOOL=OFF \
	-DBUILD_EXAMPLES:BOOL=ON \
	-DINSTALL_C_EXAMPLES:BOOL=ON \
	-DINSTALL_PYTHON_EXAMPLES:BOOL=ON \
	-DENABLE_OPENMP:BOOL=OFF \
	-DWITH_TBB:BOOL=ON \
	-DBUILD_PYTHON_SUPPORT:BOOL=ON \
	-DCMAKE_VERBOSE:BOOL=ON \
	-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
	-DCMAKE_CXX_FLAGS:STRING="%optflags" \
	-DCMAKE_C_FLAGS:STRING="%optflags" \
	-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
	-DPYTHON_PLUGIN_INSTALL_PATH:PATH=%python_sitelibdir/%bname \
	-DWITH_UNICAP:BOOL=ON \
	-DWITH_QUICKTIME:BOOL=ON \
	-DWITH_XINE:BOOL=ON \
	-DWITH_OPENGL:BOOL=ON \
	-DINSTALL_PYTHON_EXAMPLES:BOOL=ON \
	-DCMAKE_SKIP_RPATH:BOOL=ON \
	-DCMAKE_STRIP:FILEPATH="/bin/echo" \
%ifarch x86_64
	-DLIB_SUFFIX:STRING=64 \
%endif
	.
%make_build VERBOSE=1

%install
%makeinstall_std

%makeinstall_std -C interfaces/swig/python

rm -f	%buildroot%python_sitelibdir/%bname/matlab_syntax.py*

install -d %buildroot%_docdir/%name
mv %buildroot%_datadir/%Name/doc/* %buildroot%_docdir/%name/

cp -fR samples/python* %buildroot%_datadir/%Name/samples/

sed -i \
	's|\(Libs:\)\(.*\)|\1 ${exec_prefix}/%_lib/libopencv_legacy.so \2|' \
	%buildroot%_pkgconfigdir/opencv.pc

%files
%doc README
%_libdir/*.so.*
%dir %_datadir/%bname
%dir %_datadir/%Name
%_datadir/%Name/haarcascades
%_datadir/%Name/lbpcascades

%files -n lib%bname-devel
%_libdir/*.so
%_includedir/*
%_pkgconfigdir/*
%_datadir/%Name/*.cmake

%files doc
%doc doc/vidsurv
%_docdir/%name

%files utils
%_bindir/*

%files -n python-module-%bname%sover
%python_sitelibdir/*

%files examples
%dir %_datadir/%bname
%dir %_datadir/%Name
%_datadir/*/samples

%changelog
* Wed Sep 11 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt5.git20130204
- Fixed OpenCVConfig.cmake (ALT #29345)

* Sun Aug 04 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt4.git20130204
- Fixed pkg-config file (ALT #29231)

* Tue Feb 05 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt3.git20130204
- New snapshot

* Thu Sep 27 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt3.git20120917
- Built python%_python_version(%bname)

* Thu Sep 27 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt2.git20120917
- Fixed pkg-config file

* Mon Sep 17 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.9-alt1.git20120917
- Version 2.4.9

* Mon Feb 06 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.3.2-alt2.svn20111203
- Fixed build with libav 0.8

* Sun Dec 04 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.3.2-alt1.svn20111203
- Version 2.3.2

* Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 2.3.1-alt1.svn20110813.1.1
- Rebuild with Python-2.7

* Sun Aug 14 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.3.1-alt1.svn20110813.1
- Fixed headers: rename classes True -> cvTrue and False -> cvFalse

* Sat Aug 13 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.3.1-alt1.svn20110813
- Version 2.3.1

* Thu Apr 21 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.0-alt1.svn20110120.2
- Rebuilt for debuginfo

* Tue Apr 05 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.0-alt1.svn20110120.1
- Rebuilt with python-module-sphinx-devel

* Sat Jan 29 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.0-alt1.svn20110120
- New snapshot
- Added tracker3D and extra subpackages

* Wed Jan 19 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.0-alt1.svn20101222.1
- Disabled OpenMP (ALT #24934)

* Wed Dec 22 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.0-alt1.svn20101222
- New snapshot
- Fixed support of PNG images (ALT #24800)

* Wed Dec 15 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2-alt1.svn20101206.1
- Rebuilt for soname set-versions

* Tue Dec 07 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2-alt1.svn20101206
- Version 2.2
- Fixed build of python module

* Fri Nov 26 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20101118.2
- libopencv2-devel provides libopencv-devel now

* Mon Nov 22 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20101118.1
- Avoid conflict with libml10-devel

* Fri Nov 19 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20101118
- New soname version

* Mon Oct 11 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20100626.3
- Fixed underlinking of libraries

* Mon Aug 16 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20100626.2
- Avoid requirement on lib%bname-devel for python-module-%bname (ALT #23887)

* Tue Jun 29 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20100626.1
- Added explicit conflict with libml10-devel
- Renamed python packages

* Tue Jun 29 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20100626
- New snapshot

* Thu Jun 24 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.1.0-alt1.svn20091116
- Version 2.1.0

* Fri Mar 12 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.0.0-alt1.svn20091116.1
- Version 2.0.0 (ALT #23126)
- Added examples and tests packages, and pickles for python-module-%name
- Reformed with SharedLibraries Policy

* Mon Nov 16 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2.1-alt2.svn20090728.1
- Rebuilt with python 2.6

* Wed Jul 29 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2.1-alt2.svn20090728
- Enabled OpenEXR support

* Tue Jul 28 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2.1-alt1.svn20090728
- Version 1.2.1

* Fri Jul 03 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt2.svn20090630
- Replaced demo data files into separate package
- Added explicit conflict with old utils package

* Wed Jul 01 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.svn20090630
- New snapshot
- Soname changed

* Mon Feb 23 2009 Led <led@altlinux.ru> 1.1-alt0.1
- 1.1pre1
- enabled openmp

* Sun Feb 22 2009 Led <led@altlinux.ru> 1.0.0-alt2
- Added libswscale support to avoid the deprecated img_convert
- updated BuildRequires
- fixed Group

* Sun Mar 16 2008 Led <led@altlinux.ru> 1.0.0-alt1
- initial build