File ffmpeg-4.spec of Package A_tw-ffmpeg

890
 
1
#
2
# spec file for package ffmpeg-4
3
#
4
# Copyright (c) 2020 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
# Create proper conflicts to make sure we require all from one version
20
# p:   Conflict string, eg if you need them all for requires instead
21
#      Default value Conflicts:
22
# c:   copmare string ie "<" or ">=", must be defined
23
# v:   version string ie. "< 42.3.4" or ">= 15.0.2.1", must be defined
24
%define devel_conflicts(p:c:v:) \
25
%define preamble_string %{-p:%{-p*}}%{!-p:Conflicts:} \
26
%define comparator %{-c:%{-c*}}%{!-c:%{error:Comparator not defined}} \
27
%define conflicts_version %{-v:%{-v*}}%{!-v:%{error:Version not defined}} \
28
\
29
%preamble_string libavcodec-devel %comparator %conflicts_version \
30
%preamble_string libavdevice-devel %comparator %conflicts_version \
31
%preamble_string libavfilter-devel %comparator %conflicts_version \
32
%preamble_string libavformat-devel %comparator %conflicts_version \
33
%preamble_string libavresample-devel %comparator %conflicts_version \
34
%preamble_string libavutil-devel %comparator %conflicts_version \
35
%preamble_string libpostproc-devel %comparator %conflicts_version \
36
%preamble_string libswresample-devel %comparator %conflicts_version \
37
%preamble_string libswscale-devel %comparator %conflicts_version \
38
%preamble_string ffmpeg-private-devel %comparator %conflicts_version \
39
%nil
40
41
# nvcodec headers only present after leap15
42
%bcond_with nvcodec
43
%if 0%{?suse_version} > 1500
44
%bcond_without nvcodec
45
%endif
46
%if 0%{?BUILD_ORIG}
47
%bcond_with    amrwb
48
%bcond_without cuda_sdk
49
%else
50
%bcond_with cuda_sdk
51
%endif
52
%bcond_with    fdk_aac_dlopen
53
%bcond_with    librtmp
54
%bcond_with    opencore
55
%bcond_with    smbclient
56
%bcond_with    x264
57
%bcond_with    x265
58
%bcond_with    xvid
59
60
# Full build or just support package on older codestream
61
%if 0%{?suse_version} > 1500
62
%bcond_without full_build
63
%else
64
%bcond_with full_build
65
%endif
66
67
%if 0%{?suse_version} > 1500
68
%bcond_without libaom
69
%bcond_without mysofa
70
%bcond_without vidstab
71
%bcond_without srt
72
%bcond_without codec2
73
%bcond_without lv2
74
%bcond_without rubberband
75
%bcond_without soxr
76
%bcond_without zmq
77
%else
78
%bcond_with libaom
79
%bcond_with mysofa
80
%bcond_with vidstab
81
%bcond_with srt
82
%bcond_with codec2
83
%bcond_with lv2
84
%bcond_with rubberband
85
%bcond_with soxr
86
%bcond_with zmq
87
%endif
88
89
%if 0%{?suse_version} >= 1500
90
%bcond_without zimg
91
%bcond_without openmpt
92
%else
93
%bcond_with zimg
94
%bcond_with openmpt
95
%endif
96
97
%define _name ffmpeg
98
%define _major_version 4
99
%define _major_expected 5
100
Name:           ffmpeg-4
101
Version:        4.2.2
102
Release:        0
103
Summary:        Library for working with various multimedia formats
104
License:        LGPL-2.1-or-later AND GPL-2.0-or-later
105
Group:          Productivity/Multimedia/Video/Editors and Convertors
106
URL:            https://ffmpeg.org/
107
108
#Freshcode-URL:    http://freshcode.club/projects/ffmpeg
109
#Git-Clone:     git://source.ffmpeg.org/ffmpeg
110
Source:         https://www.ffmpeg.org/releases/%_name-%version.tar.xz
111
Source2:        https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc
112
Source3:        ffmpeg-4-rpmlintrc
113
Source4:        enable_decoders
114
Source5:        enable_encoders
115
Source99:       baselibs.conf
116
Patch2:         ffmpeg-arm6l.diff
117
Patch3:         ffmpeg-new-coder-errors.diff
118
Patch4:         ffmpeg-codec-choice.diff
119
Patch5:         ffmpeg-prefer-dav1d-for-playback.patch
120
Patch6:         ffmpeg-4.2-dlopen-fdk_aac.patch
121
# pending review upstream ML and issue#7861
122
# http://ffmpeg.org/pipermail/ffmpeg-devel/2019-August/247759.html
123
# https://trac.ffmpeg.org/ticket/7861
124
Patch7:         ffmpeg4_swscale_replace_illegal_vector_keyword.patch
125
Patch8:         ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch
126
Patch9:         929e5159bc13da374b83f5627879c607acce180b.patch
127
BuildRequires:  ladspa-devel
128
BuildRequires:  libgsm-devel
129
BuildRequires:  libmp3lame-devel
130
%if %{with mysofa}
131
BuildRequires:  libmysofa-devel
132
%endif
133
BuildRequires:  nasm
134
BuildRequires:  pkg-config
135
BuildRequires:  pkgconfig(alsa)
136
%if %{with libaom}
137
BuildRequires:  pkgconfig(aom)
138
%endif
139
BuildRequires:  pkgconfig(bzip2)
140
BuildRequires:  pkgconfig(celt) >= 0.11.0
141
%if %{with codec2}
142
BuildRequires:  pkgconfig(codec2)
143
%endif
144
%if 0%{?suse_version} >= 1550
145
BuildRequires:  pkgconfig(dav1d)
146
%endif
147
BuildRequires:  pkgconfig(enca)
148
BuildRequires:  pkgconfig(fontconfig) >= 2.4.2
149
BuildRequires:  pkgconfig(freetype2)
150
BuildRequires:  pkgconfig(fribidi) >= 0.19.0
151
BuildRequires:  pkgconfig(gnutls)
152
BuildRequires:  pkgconfig(jack)
153
BuildRequires:  pkgconfig(libass)
154
BuildRequires:  pkgconfig(libbluray)
155
BuildRequires:  pkgconfig(libbs2b)
156
BuildRequires:  pkgconfig(libcdio)
157
BuildRequires:  pkgconfig(libcdio_paranoia)
158
BuildRequires:  pkgconfig(libdc1394-2)
159
BuildRequires:  pkgconfig(libdrm)
160
BuildRequires:  pkgconfig(libgme)
161
BuildRequires:  pkgconfig(libopenjp2) >= 2.1.0
162
BuildRequires:  pkgconfig(libopenjpeg)
163
%if %{with openmpt}
164
BuildRequires:  pkgconfig(libopenmpt)
165
%endif
166
BuildRequires:  pkgconfig(libpng)
167
BuildRequires:  pkgconfig(libpulse)
168
BuildRequires:  pkgconfig(libraw1394)
169
BuildRequires:  pkgconfig(libssh)
170
BuildRequires:  pkgconfig(libv4l2)
171
BuildRequires:  pkgconfig(libva) >= 0.35.0
172
BuildRequires:  pkgconfig(libva-drm)
173
BuildRequires:  pkgconfig(libva-x11)
174
BuildRequires:  pkgconfig(libwebp) >= 0.4
175
BuildRequires:  pkgconfig(libxml-2.0)
176
%if %{with zmq}
177
BuildRequires:  pkgconfig(libzmq)
178
%endif
179
%if %{with lv2}
180
BuildRequires:  pkgconfig(lilv-0)
181
%endif
182
BuildRequires:  pkgconfig(ogg)
183
BuildRequires:  pkgconfig(opus)
184
%if %{with rubberband}
185
BuildRequires:  pkgconfig(rubberband)
186
%endif
187
BuildRequires:  pkgconfig(sdl2)
188
%if %{with soxr}
189
BuildRequires:  pkgconfig(soxr)
190
%endif
191
BuildRequires:  pkgconfig(speex)
192
%if %{with srt}
193
BuildRequires:  pkgconfig(srt)
194
%endif
195
BuildRequires:  pkgconfig(theora) >= 1.1
196
BuildRequires:  pkgconfig(twolame)
197
BuildRequires:  pkgconfig(vdpau)
198
%if %{with vidstab}
199
BuildRequires:  pkgconfig(vidstab) >= 0.98
200
%endif
201
BuildRequires:  pkgconfig(vorbis)
202
BuildRequires:  pkgconfig(vpx) >= 1.4.0
203
BuildRequires:  pkgconfig(x11)
204
BuildRequires:  pkgconfig(xcb)
205
BuildRequires:  pkgconfig(xcb-render)
206
BuildRequires:  pkgconfig(xcb-shape)
207
BuildRequires:  pkgconfig(xcb-shm)
208
BuildRequires:  pkgconfig(xcb-xfixes)
209
BuildRequires:  pkgconfig(xext)
210
BuildRequires:  pkgconfig(xfixes)
211
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
212
%ifarch x86_64
213
BuildRequires:  pkgconfig(libmfx)
214
%endif
215
%endif
216
%if %{with zimg}
217
BuildRequires:  pkgconfig(zimg)
218
%endif
219
BuildRequires:  pkgconfig(zlib)
220
BuildRequires:  pkgconfig(zvbi-0.2) >= 0.2.28
221
%if %{with fdk_aac_dlopen}
222
BuildRequires:  pkgconfig(fdk-aac)
223
%endif
224
%if %{with librtmp}
225
BuildRequires:  pkgconfig(librtmp)
226
%endif
227
%if %{with nvcodec}
228
BuildRequires:  pkgconfig(ffnvcodec)
229
%endif
230
%if %{with xvid}
231
BuildRequires:  libxvidcore-devel
232
%endif
233
%if %{with opencore}
234
BuildRequires:  pkgconfig(opencore-amrnb)
235
%endif
236
%if %{with amrwb}
237
BuildRequires:  pkgconfig(vo-amrwbenc)
238
%endif
239
%if %{with x264}
240
BuildRequires:  pkgconfig(x264)
241
%endif
242
%if %{with x265}
243
BuildRequires:  pkgconfig(x265)
244
%endif
245
Provides:       ffmpeg-tools = %version
246
Obsoletes:      ffmpeg-tools < %version
247
Provides:       ffmpeg = %version
248
Obsoletes:      ffmpeg < %version
249
Requires:       libavcodec58 = %version-%release
250
Requires:       libavdevice58 = %version-%release
251
Requires:       libavfilter7 = %version-%release
252
Requires:       libavformat58 = %version-%release
253
Requires:       libavresample4 = %version-%release
254
Requires:       libavutil56 = %version-%release
255
Requires:       libpostproc55 = %version-%release
256
Requires:       libswresample3 = %version-%release
257
Requires:       libswscale5 = %version-%release
258
259
%description
260
FFmpeg is a multimedia framework, able to decode, encode,
261
transcode, mux, demux, stream, filter and play several formats
262
that humans and machines have created.
263
%if !0%{?BUILD_ORIG}
264
265
This build of ffmpeg is limited in the number of codecs supported.
266
%endif
267
268
%package -n libavcodec58
269
Summary:        FFmpeg codec library
270
# For mozillas
271
Group:          System/Libraries
272
Requires:       libavutil56 = %version-%release
273
Requires:       libswresample3 = %version-%release
274
Provides:       libavcodec = %version-%release
275
%if 0%{?BUILD_ORIG}
276
Provides:       libavcodec-full = %version-%release
277
# This can be required by packages likes vlc-codecs - following the shlib name to not get random lib providers
278
Provides:       libavcodec58(unrestricted)
279
%endif
280
281
%description -n libavcodec58
282
The libavcodec library provides a generic encoding/decoding framework
283
and contains multiple decoders and encoders for audio, video and
284
subtitle streams, and several bitstream filters.
285
%if !0%{?BUILD_ORIG}
286
287
This build of ffmpeg is limited in the number of codecs supported.
288
%endif
289
290
%package libavcodec-devel
291
Summary:        Development files for FFmpeg's codec library
292
Group:          Development/Libraries/C and C++
293
Provides:       libavcodec-devel = %version-%release
294
Obsoletes:      libavcodec-devel < %version-%release
295
Requires:       %name-libavresample-devel = %version-%release
296
Requires:       %name-libavutil-devel = %version-%release
297
Requires:       libavcodec58 = %version-%release
298
%devel_conflicts -c < -v %_major_version
299
%devel_conflicts -c >= -v %_major_expected
300
301
%description libavcodec-devel
302
The libavcodec library provides a generic encoding/decoding framework
303
and contains multiple decoders and encoders for audio, video and
304
subtitle streams, and several bitstream filters.
305
306
This subpackage contains the headers for FFmpeg libavcodec.
307
308
%package -n libavdevice58
309
Summary:        FFmpeg device library
310
Group:          System/Libraries
311
Requires:       libavcodec58 = %version-%release
312
Requires:       libavfilter7 = %version-%release
313
Requires:       libavformat58 = %version-%release
314
Requires:       libavutil56 = %version-%release
315
316
%description -n libavdevice58
317
The libavdevice library provides a generic framework for grabbing from
318
and rendering to many common multimedia input/output devices, and
319
supports several input and output devices, including Video4Linux2, VfW,
320
DShow, and ALSA.
321
322
%package libavdevice-devel
323
Summary:        Development files for FFmpeg's device library
324
Group:          Development/Libraries/C and C++
325
Provides:       ffmpeg-devel = %version-%release
326
Conflicts:      ffmpeg-devel
327
Provides:       libavdevice-devel = %version-%release
328
Obsoletes:      libavdevice-devel < %version-%release
329
Requires:       %name-libavcodec-devel = %version-%release
330
Requires:       %name-libavfilter-devel = %version-%release
331
Requires:       %name-libavformat-devel = %version-%release
332
Requires:       %name-libavresample-devel = %version-%release
333
Requires:       %name-libavutil-devel = %version-%release
334
Requires:       %name-libpostproc-devel = %version-%release
335
Requires:       %name-libswresample-devel = %version-%release
336
Requires:       %name-libswscale-devel = %version-%release
337
Requires:       libavdevice58 = %version-%release
338
%devel_conflicts -c < -v %_major_version
339
%devel_conflicts -c >= -v %_major_expected
340
341
%description libavdevice-devel
342
The libavdevice library provides a generic framework for grabbing from
343
and rendering to many common multimedia input/output devices, and
344
supports several input and output devices, including Video4Linux2, VfW,
345
DShow, and ALSA.
346
347
This subpackage contains the headers for FFmpeg libavcodec.
348
349
%package -n libavfilter7
350
Summary:        FFmpeg audio and video filtering library
351
Group:          System/Libraries
352
Requires:       libavcodec58 = %version-%release
353
Requires:       libavformat58 = %version-%release
354
Requires:       libavresample4 = %version-%release
355
Requires:       libavutil56 = %version-%release
356
Requires:       libpostproc55 = %version-%release
357
Requires:       libswresample3 = %version-%release
358
Requires:       libswscale5 = %version-%release
359
360
%description -n libavfilter7
361
The libavfilter library provides a generic audio/video filtering
362
framework containing several filters, sources and sinks.
363
364
%package libavfilter-devel
365
Summary:        Development files for FFmpeg's audio/video filter library
366
Group:          Development/Libraries/C and C++
367
Provides:       libavfilter-devel = %version-%release
368
Obsoletes:      libavfilter-devel < %version-%release
369
Requires:       %name-libavcodec-devel = %version-%release
370
Requires:       %name-libavformat-devel = %version-%release
371
Requires:       %name-libavresample-devel = %version-%release
372
Requires:       %name-libavutil-devel = %version-%release
373
Requires:       %name-libpostproc-devel = %version-%release
374
Requires:       %name-libswresample-devel = %version-%release
375
Requires:       %name-libswscale-devel = %version-%release
376
Requires:       libavfilter7 = %version-%release
377
%devel_conflicts -c < -v %_major_version
378
%devel_conflicts -c >= -v %_major_expected
379
380
%description libavfilter-devel
381
The libavfilter library provides a generic audio/video filtering
382
framework containing several filters, sources and sinks.
383
384
This subpackage contains the headers for FFmpeg libavfilter.
385
386
%package -n libavformat58
387
Summary:        FFmpeg's stream format library
388
Group:          System/Libraries
389
Requires:       libavcodec58 = %version-%release
390
Requires:       libavutil56 = %version-%release
391
392
%description -n libavformat58
393
The libavformat library provides a generic framework for multiplexing
394
and demultiplexing (muxing and demuxing) audio, video and subtitle
395
streams. It encompasses multiple muxers and demuxers for multimedia
396
container formats.
397
%if !0%{?BUILD_ORIG}
398
399
This build of ffmpeg is limited in the number of codecs supported.
400
%endif
401
402
%package libavformat-devel
403
Summary:        Development files for FFmpeg's stream format library
404
Group:          Development/Libraries/C and C++
405
Provides:       libavformat-devel = %version-%release
406
Obsoletes:      libavformat-devel < %version-%release
407
Requires:       %name-libavcodec-devel = %version-%release
408
Requires:       %name-libavutil-devel = %version-%release
409
Requires:       %name-libswresample-devel = %version-%release
410
Requires:       libavformat58 = %version-%release
411
%devel_conflicts -c < -v %_major_version
412
%devel_conflicts -c >= -v %_major_expected
413
414
%description libavformat-devel
415
The libavformat library provides a generic framework for multiplexing
416
and demultiplexing (muxing and demuxing) audio, video and subtitle
417
streams. It encompasses multiple muxers and demuxers for multimedia
418
container formats.
419
420
This subpackage contains the headers for FFmpeg libavformat.
421
422
%package -n libavresample4
423
Summary:        FFmpeg alternate audio resampling library
424
Group:          System/Libraries
425
Requires:       libavutil56 = %version-%release
426
427
%description -n libavresample4
428
An audio resampling library that is being provided for drop-in
429
compatibility with libav.
430
431
It is advised to use libswresample for new code.
432
433
%package libavresample-devel
434
Summary:        Development files for libavresample as present in FFmpeg
435
Group:          Development/Libraries/C and C++
436
Provides:       libavresample-devel = %version-%release
437
Obsoletes:      libavresample-devel < %version-%release
438
Requires:       %name-libavutil-devel = %version-%release
439
Requires:       libavresample4 = %version-%release
440
%devel_conflicts -c < -v %_major_version
441
%devel_conflicts -c >= -v %_major_expected
442
443
%description libavresample-devel
444
An audio resampling library that is being provided for drop-in
445
compatibility with libav.
446
447
It is advised to use libswresample for new code.
448
449
This subpackage contains the headers for FFmpeg's copy of libavresample.
450
451
%package -n libavutil56
452
Summary:        FFmpeg's utility library
453
Group:          System/Libraries
454
455
%description -n libavutil56
456
The libavutil library is a utility library to aid portable multimedia
457
programming. It contains safe portable string functions, random
458
number generators, data structures, additional mathematics functions,
459
cryptography and multimedia related functionality (like enumerations
460
for pixel and sample formats).
461
462
%package libavutil-devel
463
Summary:        Development files for FFmpeg's utility library
464
Group:          Development/Libraries/C and C++
465
Provides:       libavutil-devel = %version-%release
466
Obsoletes:      libavutil-devel < %version-%release
467
Requires:       libavutil56 = %version-%release
468
%devel_conflicts -c < -v %_major_version
469
%devel_conflicts -c >= -v %_major_expected
470
471
%description libavutil-devel
472
The libavutil library is a utility library to aid portable multimedia
473
programming. It contains safe portable string functions, random
474
number generators, data structures, additional mathematics functions,
475
cryptography and multimedia related functionality (like enumerations
476
for pixel and sample formats).
477
478
This subpackage contains the headers for FFmpeg libavutil.
479
480
%package -n libpostproc55
481
Summary:        FFmpeg post-processing library
482
Group:          System/Libraries
483
Requires:       libavutil56 = %version-%release
484
485
%description -n libpostproc55
486
A library with video postprocessing filters, such as deblocking and
487
deringing filters, noise reduction, automatic contrast and brightness
488
correction, linear/cubic interpolating deinterlacing.
489
490
%package libpostproc-devel
491
Summary:        Development files for the FFmpeg post-processing library
492
Group:          Development/Libraries/C and C++
493
Provides:       libpostproc-devel = %version-%release
494
Obsoletes:      libpostproc-devel < %version-%release
495
Requires:       %name-libavutil-devel = %version-%release
496
Requires:       libpostproc55 = %version-%release
497
%devel_conflicts -c < -v %_major_version
498
%devel_conflicts -c >= -v %_major_expected
499
500
%description libpostproc-devel
501
A library with video postprocessing filters, such as deblocking and
502
deringing filters, noise reduction, automatic contrast and brightness
503
correction, linear/cubic interpolating deinterlacing.
504
505
This subpackage contains the headers for FFmpeg libpostproc.
506
507
%package -n libswresample3
508
Summary:        FFmpeg software resampling library
509
Group:          System/Libraries
510
Requires:       libavutil56 = %version-%release
511
512
%description -n libswresample3
513
The libswresample library performs audio conversion between different
514
sample rates, channel layout and channel formats.
515
516
%package libswresample-devel
517
Summary:        Development files for the FFmpeg software resampling library
518
Group:          Development/Libraries/C and C++
519
Provides:       libswresample-devel = %version-%release
520
Obsoletes:      libswresample-devel < %version-%release
521
Requires:       %name-libavutil-devel = %version-%release
522
Requires:       libswresample3 = %version-%release
523
%devel_conflicts -c < -v %_major_version
524
%devel_conflicts -c >= -v %_major_expected
525
526
%description libswresample-devel
527
The libswresample library performs audio conversion between different
528
sample rates, channel layout and channel formats.
529
530
This subpackage contains the headers for FFmpeg libswresample.
531
532
%package -n libswscale5
533
Summary:        FFmpeg image scaling and colorspace/pixel conversion library
534
Group:          System/Libraries
535
Requires:       libavutil56 = %version-%release
536
537
%description -n libswscale5
538
The libswscale library performs image scaling and colorspace and
539
pixel format conversion operations.
540
541
%package libswscale-devel
542
Summary:        Development files for FFmpeg's image scaling and colorspace library
543
Group:          Development/Libraries/C and C++
544
Provides:       libswscale-devel = %version-%release
545
Conflicts:      libswscale-devel
546
Requires:       %name-libavutil-devel = %version-%release
547
Requires:       libswscale5 = %version-%release
548
%devel_conflicts -c < -v %_major_version
549
%devel_conflicts -c >= -v %_major_expected
550
551
%description libswscale-devel
552
The libswscale library performs image scaling and colorspace and
553
pixel format conversion operations.
554
555
This subpackage contains the headers for FFmpeg libswscale.
556
557
%package private-devel
558
Summary:        Some FFmpeg private headers
559
Group:          Development/Libraries/C and C++
560
Requires:       %name-libavcodec-devel = %version-%release
561
Requires:       %name-libavformat-devel = %version-%release
562
Requires:       %name-libavutil-devel = %version-%release
563
Provides:       ffmpeg-private-devel = %version
564
Obsoletes:      ffmpeg-private-devel < %version
565
%devel_conflicts -c < -v %_major_version
566
%devel_conflicts -c >= -v %_major_expected
567
568
%description private-devel
569
FFmpeg is a multimedia framework, able to decode, encode,
570
transcode, mux, demux, stream, filter and play several formats
571
that humans and machines have created.
572
573
This package contains some private headers for libavformat, libavcodec and
574
libavutil which are needed by libav-tools to build. No other package apart
575
from libav should depend on these private headers which are expected to
576
break compatibility without any notice.
577
578
%prep
579
%setup -q -n %_name-%version
580
%autopatch -p1
581
582
%build
583
%ifarch %ix86 %arm
584
%define _lto_cflags %nil
585
%endif
586
CFLAGS="%optflags" \
587
%if %suse_version > 1500
588
%ifarch %ix86
589
%else
590
LDFLAGS="%_lto_cflags" \
591
%endif
592
%endif
593
./configure \
594
    --prefix="%_prefix" \
595
    --libdir="%_libdir" \
596
    --shlibdir="%_libdir" \
597
    --incdir="%_includedir/ffmpeg" \
598
    --extra-cflags="%optflags" \
599
    --optflags="%optflags" \
600
    --disable-htmlpages \
601
    --enable-pic \
602
    --disable-stripping \
603
    --enable-shared \
604
    --disable-static \
605
    --enable-gpl \
606
    --disable-openssl \
607
    --enable-avresample \
608
    --enable-gnutls \
609
    --enable-ladspa \
610
%if ! %{with cuda_sdk}
611
    --disable-cuda-sdk \
612
%endif
613
%if %{with libaom}
614
    --enable-libaom \
615
%endif
616
    --enable-libass \
617
    --enable-libbluray \
618
    --enable-libbs2b \
619
    --enable-libcelt \
620
    --enable-libcdio \
621
%if %{with codec2}
622
    --enable-libcodec2 \
623
%endif
624
%if 0%{?suse_version} >= 1550
625
    --enable-libdav1d \
626
%endif
627
    --enable-libdc1394 \
628
    --enable-libdrm \
629
    --enable-libfontconfig \
630
    --enable-libfreetype \
631
    --enable-libfribidi \
632
    --enable-libgsm \
633
    --enable-libjack \
634
    --enable-libmp3lame \
635
%if %{with mysofa}
636
    --enable-libmysofa \
637
%endif
638
    --enable-libopenjpeg \
639
%if %{with openmpt}
640
    --enable-libopenmpt \
641
%endif
642
    --enable-libopus \
643
    --enable-libpulse \
644
%if %{with rubberband}
645
    --enable-librubberband \
646
%endif
647
%if %{with smbclient}
648
    --enable-libsmbclient
649
    --enable-version3
650
%endif
651
%if %{with soxr}
652
    --enable-libsoxr \
653
%endif
654
    --enable-libspeex \
655
    --enable-libssh \
656
%if %{with srt}
657
    --enable-libsrt \
658
%endif
659
    --enable-libtheora \
660
    --enable-libtwolame \
661
%if %{with vidstab}
662
    --enable-libvidstab \
663
%endif
664
    --enable-libvorbis \
665
    --enable-libv4l2 \
666
    --enable-libvpx \
667
    --enable-libwebp \
668
    --enable-libxml2 \
669
%if %{with zimg}
670
    --enable-libzimg \
671
%endif
672
%if %{with zmq}
673
    --enable-libzmq \
674
%endif
675
    --enable-libzvbi \
676
%if 0%{?suse_version} > 1500
677
%ifarch %ix86
678
%else
679
  --enable-lto \
680
%endif
681
%endif
682
%if %{with lv2}
683
    --enable-lv2 \
684
%endif
685
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
686
%ifarch x86_64
687
    --enable-libmfx \
688
%endif
689
%endif
690
    --enable-vaapi \
691
    --enable-vdpau \
692
%if %{with fdk_aac_dlopen}
693
    --enable-libfdk-aac-dlopen \
694
    --enable-nonfree \
695
%endif
696
%if %{with opencore}
697
    --enable-libopencore-amrnb \
698
    --enable-libopencore-amrwb \
699
    --enable-version3 \
700
%endif
701
%if %{with amrwb}
702
    --enable-libvo-amrwbenc \
703
    --enable-version3 \
704
%endif
705
%if %{with x264}
706
    --enable-libx264 \
707
%endif
708
%if %{with x265}
709
    --enable-libx265 \
710
%endif
711
%if %{with librtmp}
712
    --enable-librtmp \
713
%endif
714
%if %{with xvid}
715
    --enable-libxvid \
716
%endif
717
%if !0%{?BUILD_ORIG}
718
    --enable-muxers \
719
    --enable-demuxers \
720
    --disable-encoders \
721
    --disable-decoders \
722
    --disable-decoder=mpeg4,h263,h264,hevc,vc1 \
723
    --enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_encoders)" \
724
    --enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_decoders)" \
725
726
for i in MPEG4 H263 H264 HEVC VC1; do
727
    grep -q "#define CONFIG_${i}_DECODER 0" config.h
728
done
729
%endif
730
731
cat config.h
732
%make_build
733
734
%global extratools aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper probetest qt-faststart seek_print sidxindex trasher
735
736
for i in %extratools; do
737
    %make_build "tools/$i"
738
done
739
740
%install
741
b="%buildroot"
742
%make_install install-man
743
%if %{with full_build}
744
rm -Rf "$b/%_datadir/ffmpeg/examples"
745
for i in %extratools; do
746
    cp -a "tools/$i" "$b/%_bindir/"
747
done
748
%else
749
rm -Rf "$b/%_bindir" "$b/%_mandir/man1" "$b/%_datadir/ffmpeg"
750
%endif
751
752
# Install private headers required by libav-tools
753
for i in libavformat/options_table.h libavformat/os_support.h \
754
  libavformat/internal.h libavcodec/options_table.h libavutil/libm.h \
755
  libavutil/internal.h libavutil/colorspace.h libavutil/timer.h \
756
  libavutil/x86/emms.h libavutil/aarch64/timer.h libavutil/arm/timer.h \
757
  libavutil/bfin/timer.h libavutil/ppc/timer.h libavutil/x86/timer.h; do
758
    mkdir -p "$b/%_includedir/ffmpeg/private/"`dirname $i`
759
    cp -a $i "$b/%_includedir/ffmpeg/private/$i"
760
done
761
762
%post   -n libavcodec58 -p /sbin/ldconfig
763
%postun -n libavcodec58 -p /sbin/ldconfig
764
%post   -n libavdevice58 -p /sbin/ldconfig
765
%postun -n libavdevice58 -p /sbin/ldconfig
766
%post   -n libavfilter7 -p /sbin/ldconfig
767
%postun -n libavfilter7 -p /sbin/ldconfig
768
%post   -n libavformat58 -p /sbin/ldconfig
769
%postun -n libavformat58 -p /sbin/ldconfig
770
%post   -n libavresample4 -p /sbin/ldconfig
771
%postun -n libavresample4 -p /sbin/ldconfig
772
%post   -n libavutil56 -p /sbin/ldconfig
773
%postun -n libavutil56 -p /sbin/ldconfig
774
%post   -n libpostproc55 -p /sbin/ldconfig
775
%postun -n libpostproc55 -p /sbin/ldconfig
776
%post   -n libswresample3 -p /sbin/ldconfig
777
%postun -n libswresample3 -p /sbin/ldconfig
778
%post   -n libswscale5 -p /sbin/ldconfig
779
%postun -n libswscale5 -p /sbin/ldconfig
780
781
%if %{with full_build}
782
%files
783
%doc Changelog CREDITS README.md
784
%_bindir/*
785
%_mandir/man1/ff*.1*
786
%_datadir/ffmpeg/
787
%endif
788
789
%files -n libavcodec58
790
%license COPYING.GPLv2 LICENSE.md
791
%_libdir/libavcodec.so.*
792
793
%files -n libavdevice58
794
%license COPYING.GPLv2 LICENSE.md
795
%_libdir/libavdevice.so.*
796
797
%files -n libavfilter7
798
%license COPYING.GPLv2 LICENSE.md
799
%_libdir/libavfilter.so.*
800
801
%files -n libavformat58
802
%license COPYING.GPLv2 LICENSE.md
803
%_libdir/libavformat.so.*
804
805
%files -n libavresample4
806
%license COPYING.GPLv2 LICENSE.md
807
%_libdir/libavresample.so.*
808
809
%files -n libavutil56
810
%license COPYING.GPLv2 LICENSE.md
811
%_libdir/libavutil.so.*
812
813
%files -n libpostproc55
814
%license COPYING.GPLv2 LICENSE.md
815
%_libdir/libpostproc.so.*
816
817
%files -n libswresample3
818
%license COPYING.GPLv2 LICENSE.md
819
%_libdir/libswresample.so.*
820
821
%files -n libswscale5
822
%license COPYING.GPLv2 LICENSE.md
823
%_libdir/libswscale.so.*
824
825
%files libavcodec-devel
826
%dir %_includedir/ffmpeg/
827
%_includedir/ffmpeg/libavcodec/
828
%_libdir/libavcodec.so
829
%_libdir/pkgconfig/libavcodec.pc
830
%_mandir/man3/libavcodec.3*
831
832
%files libavdevice-devel
833
%dir %_includedir/ffmpeg/
834
%_includedir/ffmpeg/libavdevice/
835
%_libdir/libavdevice.so
836
%_libdir/pkgconfig/libavdevice.pc
837
%_mandir/man3/libavdevice.3*
838
839
%files libavfilter-devel
840
%dir %_includedir/ffmpeg/
841
%_includedir/ffmpeg/libavfilter/
842
%_libdir/libavfilter.so
843
%_libdir/pkgconfig/libavfilter.pc
844
%_mandir/man3/libavfilter.3*
845
846
%files libavformat-devel
847
%dir %_includedir/ffmpeg/
848
%_includedir/ffmpeg/libavformat/
849
%_libdir/libavformat.so
850
%_libdir/pkgconfig/libavformat.pc
851
%_mandir/man3/libavformat.3*
852
853
%files libavresample-devel
854
%dir %_includedir/ffmpeg/
855
%_includedir/ffmpeg/libavresample/
856
%_libdir/libavresample.so
857
%_libdir/pkgconfig/libavresample.pc
858
859
%files libavutil-devel
860
%dir %_includedir/ffmpeg/
861
%_includedir/ffmpeg/libavutil/
862
%_libdir/libavutil.so
863
%_libdir/pkgconfig/libavutil.pc
864
%_mandir/man3/libavutil.3*
865
866
%files libpostproc-devel
867
%dir %_includedir/ffmpeg/
868
%_includedir/ffmpeg/libpostproc/
869
%_libdir/libpostproc.so
870
%_libdir/pkgconfig/libpostproc.pc
871
872
%files libswresample-devel
873
%dir %_includedir/ffmpeg/
874
%_includedir/ffmpeg/libswresample/
875
%_libdir/libswresample.so
876
%_libdir/pkgconfig/libswresample.pc
877
%_mandir/man3/libswresample.3*
878
879
%files libswscale-devel
880
%dir %_includedir/ffmpeg/
881
%_includedir/ffmpeg/libswscale/
882
%_libdir/libswscale.so
883
%_libdir/pkgconfig/libswscale.pc
884
%_mandir/man3/libswscale.3*
885
886
%files private-devel
887
%_includedir/ffmpeg/private/
888
889
%changelog
890