Пакет ffmpeg: 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
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
# defined macro based on Sergey Bolshakov <sbolshakov@altlinux.org> libav spec

# Macros
%define set_disable() %{expand:%%force_disable %{1}} %{expand:%%undefine _enable_%{1}}
%define set_enable() %{expand:%%force_enable %{1}} %{expand:%%undefine _disable_%{1}}
%define subst_enable_with() %{expand:%%{?_enable_%{1}:--enable-%{2}} } %{expand:%%{?_disable_%{1}:--disable-%{2}} }

# License
%def_enable gpl
%def_enable version3
%def_disable nonfree

# Enable/Disable stuff
%def_enable doc
%def_enable ffplay
%def_enable ffprobe
%def_enable pthreads
%def_enable shared
%def_disable static
%ifarch %ix86 x86_64
%def_enable mmx
%else
%def_disable mmx
%endif
%def_enable debug
# External library support
%def_enable bzlib
%def_enable chromaprint
%def_enable frei0r
%def_enable gnutls
%def_enable libaom
%def_enable libass
%def_enable libbluray
%def_enable libbs2b
%def_enable libcaca
%def_enable libcdio
%def_enable libcodec2
%def_enable libdav1d
%def_enable libdc1394
%def_enable libdrm
%def_disable libflite
%def_enable libfontconfig
%def_enable libfreetype
%def_enable libfribidi
%def_disable libglslang
%def_enable libgme
%def_enable libgsm
%def_enable libjack
%def_enable liblensfun
%def_enable libmp3lame
%{?_enable_version3:%def_enable libopencore_amrnb}
%{?_enable_version3:%def_enable libopencore_amrwb}
%def_enable libopenjpeg
%def_enable libopus
%def_enable libpulse
%def_enable librabbitmq
%def_enable librsvg
%def_disable librtmp
%def_enable librubberband
%def_enable libsnappy
%def_enable libsoxr
%def_enable libspeex
%def_enable libssh
%def_enable libtheora
%def_enable libtwolame
%def_enable libudev
%def_enable libv4l2
%def_enable libvidstab
%def_enable libvorbis
%def_enable libvpx
%def_enable libwavpack
%def_enable libwebp
%def_enable libx264
%def_enable libx265
%def_enable libxml2
%def_enable libxvid
%def_enable libzmq
%def_enable libzvbi
%def_enable lv2
%def_enable openal
%def_enable opengl
%def_enable sdl2
%def_enable vaapi
%def_enable vdpau
%def_enable vulkan
%def_enable zlib

# library needed
%def_disable avisynth
%def_disable crystalhd
%def_disable ladspa
%def_disable libaribb24
%def_disable libdavs2
%def_disable libilbc
%def_disable libklvanc
%def_disable libkvazaar
%def_disable libmfx
%def_disable libmodplug
%def_disable libmysofa
%def_disable libopenh264
%def_disable libopenmpt
%def_disable librav1e
%def_disable libshine
%def_disable libsrt
%def_disable libtensorflow
%def_disable libtesseract
%def_disable libvmaf
%def_disable libxavs2
%def_disable libzimg
%def_disable mbedtls
%def_disable omx
%def_disable opencl
%def_disable pocketsphinx
%def_disable vapoursynth

# need libcelt >= 0.11.0
%def_disable libcelt

%if_enabled mmx
%set_verify_elf_method textrel=relaxed
%endif

%ifarch %arm
%set_verify_elf_method textrel=relaxed
%endif
#soversion

# nvidia cuda doesn't support arm
# https://developer.nvidia.com/nvidia-video-codec-sdk/download
%ifarch %arm
%def_disable cuvid
%else
%def_enable cuvid
%endif # cuvid

%define avdevicever 58
%define avformatver 58
%define avfilterver 7
%define avcodecver 58
%define postprocver 55
%define swresamplever 3
%define avresamplever 4
%define swscalever 5
%define avutilver 56

Name:		ffmpeg
Epoch:		2
Version:	4.3.3
Release:	alt1.E2K.1

Summary:	A command line toolbox to manipulate, convert and stream multimedia content
License:	GPLv3
Group:		Video

Url:		http://ffmpeg.org

# https://git.ffmpeg.org/ffmpeg.git
Source:		%name-%version.tar
Patch:		%name-%version-%release.patch
BuildRequires:	libX11-devel libXext-devel libXvMC-devel libXfixes-devel
BuildRequires:	libalsa-devel
%ifarch %ix86 x86_64
BuildRequires:	yasm
%endif

%{?_enable_doc:BuildRequires: perl-podlators texi2html}
%{?_enable_ffplay:BuildRequires: libSDL2-devel}
%{?_enable_bzlib:BuildRequires: bzlib-devel}
%{?_enable_chromaprint:BuildRequires: libchromaprint-devel}
%{?_enable_frei0r:BuildRequires: frei0r-devel}
%{?_enable_gnutls:BuildRequires: libgnutls-devel}
%{?_enable_libaom:BuildRequires: libaom-devel >= 1.0.0}
%{?_enable_libass:BuildRequires: libass-devel}
%{?_enable_libbluray:BuildRequires: libbluray-devel}
%{?_enable_libbs2b:BuildRequires: libbs2b-devel}
%{?_enable_libcaca:BuildRequires: libcaca-devel}
%{?_enable_libcdio:BuildRequires: libcdio-devel libcdio-paranoia-devel}
%{?_enable_libcelt:BuildRequires: libcelt-devel}
%{?_enable_libcodec2:BuildRequires: libcodec2-devel}
%{?_enable_libdav1d:BuildRequires: libdav1d-devel}
%{?_enable_libdc1394:BuildRequires: libdc1394-devel libraw1394-devel}
%{?_enable_libdrm:BuildRequires: libdrm-devel}
%{?_enable_libfreetype:BuildRequires: libfreetype-devel}
%{?_enable_libflite:BuildRequires: flite-devel}
%{?_enable_libfontconfig:BuildRequires: fontconfig-devel}
%{?_enable_libfribidi:BuildRequires: libfribidi-devel}
%{?_enable_libglslang:BuildRequires: glslang-devel}
%{?_enable_libgme:BuildRequires: libgme-devel}
%{?_enable_libgsm:BuildRequires: libgsm-devel}
%{?_enable_libjack:BuildRequires: libjack-devel}
%{?_enable_liblensfun:BuildRequires: liblensfun-devel}
%{?_enable_libmp3lame:BuildRequires: liblame-devel}
%{?_enable_librabbitmq:BuildRequires: librabbitmq-c-devel}
%{?_enable_libopencore_amrnb:BuildRequires: libopencore-amrnb-devel}
%{?_enable_libopencore_amrwb:BuildRequires: libopencore-amrwb-devel}
%{?_enable_libopenjpeg:BuildRequires: libopenjpeg2.0-devel}
%{?_enable_libopus:BuildRequires: libopus-devel}
%{?_enable_libpulse:BuildRequires: libpulseaudio-devel}
%{?_enable_librsvg:BuildRequires: librsvg-devel}
%{?_enable_librubberband:BuildRequires: librubberband-devel libstdc++-devel}
%{?_enable_librtmp:BuildRequires: librtmp-devel}
%{?_enable_libsnappy:BuildRequires: libsnappy-devel}
%{?_enable_libsoxr:BuildRequires: libsoxr-devel}
%{?_enable_libssh:BuildRequires: libssh-devel}
%{?_enable_libspeex:BuildRequires: libspeex-devel}
%{?_enable_libtheora:BuildRequires: libtheora-devel}
%{?_enable_libtwolame:BuildRequires: libtwolame-devel}
%{?_enable_libudev:BuildRequires: libudev-devel}
%{?_enable_libv4l2:BuildRequires: libv4l-devel}
%{?_enable_libvidstab:BuildRequires: libvidstab-devel}
%{?_enable_libvorbis:BuildRequires: libvorbis-devel}
%{?_enable_libvpx:BuildRequires: libvpx-devel}
%{?_enable_libwavpack:BuildRequires: libwavpack-devel}
%{?_enable_libwebp:BuildRequires: libwebp-devel}
%{?_enable_libx264:BuildRequires: libx264-devel >= 118}
%{?_enable_libx265:BuildRequires: libx265-devel}
%{?_enable_libxml2:BuildRequires: libxml2-devel}
%{?_enable_libxvid:BuildRequires: libxvid-devel}
%{?_enable_libzmq:BuildRequires: libzeromq-devel}
%{?_enable_libzvbi:BuildRequires: libzvbi-devel}
%{?_enable_lv2:BuildRequires: liblilv-devel lv2-devel}
%{?_enable_openal:BuildRequires: libopenal-devel}
%{?_enable_opengl:BuildRequires: libGL-devel}
%{?_enable_sdl2:BuildRequires: libSDL2-devel}
%{?_enable_vaapi:BuildRequires: libva-devel}
%{?_enable_vdpau:BuildRequires: libvdpau-devel}
%{?_enable_vulkan:BuildRequires: libvulkan-devel}
%{?_enable_cuvid:BuildRequires: nv-codec-headers}

%define common_descr \
FFmpeg is a collection of libraries and tools to process multimedia content\
such as audio, video, subtitles and related metadata.

%description
%common_descr

The ffmpeg is a command line toolbox to manipulate, convert and stream
multimedia content.


%package	doc
Summary:	FFmpeg documentation
Group:		Documentation
BuildArch:	noarch

%description	doc
%common_descr

This package contains documentation for FFmpeg.

%package -n	ffplay
Summary:	A minimalistic multimedia player
Group:		Video
Obsoletes:	avplay
Provides:	avplay

%description -n	ffplay
%common_descr

This package contains a minimalistic multimedia player.

%package -n	ffplay-doc
Summary:	Documentation for ffplay
Group:		Documentation
BuildArch:	noarch

%description -n	ffplay-doc
%common_descr

This package contains documentation for ffplay.

%package -n	ffprobe
Summary:	A simple analysis tool to inspect multimedia content
Group:		Video
Obsoletes:	avprobe
Provides:	avprobe

%description -n	ffprobe
%common_descr

This package contains ffprobe, a simple analysis tool to inspect
multimedia content.

%package -n	ffprobe-doc
Summary:	Documentation for ffprobe
Group:		Documentation
BuildArch:	noarch

%description -n	ffprobe-doc
%common_descr

This package contains documentation for ffprobe.

%package -n	ffserver
Summary:	A multimedia streaming server for live broadcasts
Group:		Video

%description -n ffserver
%common_descr

This package contains a multimedia streaming server for live broadcasts.


%package -n	ffserver-doc
Summary:	Documentation for ffserver
Group:		Documentation
BuildArch:	noarch

%description -n ffserver-doc
%common_descr

This package contains documentation for ffserver.


%package -n	libavcodec%avcodecver
Summary:	provides implementation of a wider range of codecs
Group:		System/Libraries

%description -n libavcodec%avcodecver
%common_descr

The libavcodec library provides implementation of a wider range of
codecs.

%package -n libavcodec-devel
Summary: Development files for libavcodec
Group: Development/C
Requires: libavcodec%avcodecver = %EVR
Requires: libavutil-devel = %EVR

%description -n libavcodec-devel
This package contains development files for libavcodec.

%package -n libavcodec-devel-static
Summary: Static development files for libavcodec
Group: Development/C
Requires: libavcodec-devel = %EVR


%description -n libavcodec-devel-static
This package contains static development files for libavcodec.


%package -n	libavdevice%avdevicever
Summary:	FFmpeg device handling library
Group:		System/Libraries

%description -n libavdevice%avdevicever
%common_descr

The libavdevice library provides a generic framework for grabbing from
and rendering to many common multimedia input/output devices, and
supports several input and output devices, including Video4Linux2, VfW,
DShow, and ALSA.

%package -n libavdevice-devel
Summary: Development files for libavdevice
Group: Development/C
Requires: libavdevice%avdevicever = %EVR

%description -n libavdevice-devel
This package contains development files for libavdevice.

%package -n libavdevice-devel-static
Summary: Static development files for libavdevice
Group: Development/C
Requires: libavdevice-devel = %EVR

%description -n libavdevice-devel-static
This package contains static development files for libavdevice.

%package -n	libavfilter%avfilterver
Summary:	FFmpeg filter layer library
Group:		System/Libraries

%description -n libavfilter%avfilterver
%common_descr

The libavfilter library provides a mean to alter decoded Audio and Video
through chain of filters.

%package -n libavfilter-devel
Summary: Development files for libavfilter
Group: Development/C
Requires: libavfilter%avfilterver = %EVR

%description -n libavfilter-devel
This package contains development files for libavfilter.

%package -n libavfilter-devel-static
Summary: Static development files for libavfilter
Group: Development/C
Requires: libavfilter-devel = %EVR

%description -n libavfilter-devel-static
This package contains static development files for libavfilter.

%package -n	libavformat%avformatver
Summary:	FFmpeg audio, video and subtitle streams (de)multiplexing library
Group:		System/Libraries

%description -n libavformat%avformatver
%common_descr

The libavformat library implements streaming protocols, container
formats and basic I/O access.

%package -n libavformat-devel
Summary: Development files for libavcodec
Group: Development/C
Requires: libavformat%avformatver = %EVR
Requires: libavcodec-devel = %EVR

%description -n libavformat-devel
This package contains development files for libavformat.


%package -n libavformat-devel-static
Summary: Static development files for libavformat
Group: Development/C
Requires: libavformat-devel = %EVR

%description -n libavformat-devel-static
This package contains static development files for libavformat.

%package -n	libavutil%avutilver
Summary:	Utility library to aid portable multimedia programming
Group:		System/Libraries

%description -n libavutil%avutilver
%common_descr

The libavutil library includes hashers, decompressors and miscellaneous
utility functions.

%package -n libavutil-devel
Summary: Development files for libavutil
Group: Development/C
Requires: libavutil%avutilver = %EVR

%description -n libavutil-devel
This package contains development files for libavutil.

%package -n libavutil-devel-static
Summary: Static development files for libavutil
Group: Development/C
Requires: libavutil-devel = %EVR

%description -n libavutil-devel-static
This package contains static development files for libavutil.

%package -n	libpostproc%postprocver
Summary:	FFmpeg postprocessing library
Group:		System/Libraries

%description -n libpostproc%postprocver
%common_descr

The libpostproc library implements video postprocessing routines.

%package -n libpostproc-devel
Summary: Development files for libpostproc
Group: Development/C
Requires: libpostproc%postprocver = %EVR
Requires: libavutil-devel = %EVR

%description -n libpostproc-devel
This package contains development files for libpostproc.

%package -n libpostproc-devel-static
Summary: Static development files for libpostproc
Group: Development/C
Requires: libpostproc-devel = %EVR

%description -n libpostproc-devel-static
This package contains static development files for libpostproc.

%package -n	libswresample%swresamplever
Summary:	FFmpeg audio resampling, rematrixing and sample format conversion library
Group:		System/Libraries

%description -n libswresample%swresamplever
%common_descr

The libswresample library implements audio mixing and resampling
routines.

%package -n libswresample-devel
Summary: Development files for libswresample
Group: Development/C
Requires: libswresample%swresamplever = %EVR
Requires: libavutil-devel = %EVR

%description -n libswresample-devel
This package contains development files for libswresample.

%package -n libswresample-devel-static
Summary: Static development files for libswresample
Group: Development/C
Requires: libswresample-devel = %EVR

%description -n libswresample-devel-static
This package contains static development files for libswresample.

%package -n	libavresample%avresamplever
Summary:	FFmpeg video postprocessing library
Group:		System/Libraries

%description -n libavresample%avresamplever
%common_descr
This package contains libavresample, the ffmpeg project video postprocessing library.

%package -n libavresample-devel
Summary: Development files for libswresample
Group: Development/C
Requires: libavresample%avresamplever = %EVR
Requires: libavutil-devel = %EVR

%description -n libavresample-devel
This package contains development files for libavresample.

%package -n libavresample-devel-static
Summary: Static development files for libavresample
Group: Development/C
Requires: libavresample-devel = %EVR

%description -n libavresample-devel-static
This package contains static development files for libavresample.



%package -n	libswscale%swscalever
Summary:	FFmpeg image scaling and colorspace and pixel format conversion library
Group:		System/Libraries

%description -n libswscale%swscalever
%common_descr

The libswscale library implements color conversion and scaling routines.

%package -n libswscale-devel
Summary: Development files for libswscale
Group: Development/C
Requires: libswscale%swscalever = %EVR
Requires: libavutil-devel = %EVR

%description -n libswscale-devel
This package contains development files for libswscale.

%package -n libswscale-devel-static
Summary: Static development files for libswscale
Group: Development/C
Requires: libswscale-devel = %EVR

%description -n libswscale-devel-static
This package contains static development files for libswscale.

%prep
%setup
%patch -p1

%build
xz Changelog
%ifarch x86_64
%add_optflags %optflags_shared
%else
%ifarch %ix86
%add_optflags %{?_enable_mmx:-DRUNTIME_CPUDETECT}
%endif
%endif
./configure \
	--prefix=%_prefix \
	--libdir=%_libdir \
	--shlibdir=%_libdir \
	--mandir=%_mandir \
	--docdir=%_docdir/%name-%version \
	--disable-rpath \
%ifarch armh aarch64
	--enable-v4l2_m2m \
	--enable-v4l2-request \
%endif
%ifarch mips mipsel mips64 mips64el
	--disable-mipsdsp \
	--disable-mipsdspr2 \
	--disable-loongson2 \
	--disable-loongson3 \
	--disable-mmi \
	--disable-mips32r5 \
	--disable-mips32r6 \
	--disable-mips64r6 \
	--disable-msa \
%endif
%ifarch mips mipsel
	--disable-mipsfpu \
%endif
	%{subst_enable gpl} \
	%{subst_enable version3} \
	%{subst_enable pthreads} \
	%{subst_enable shared} \
	%{subst_enable static} \
	%{subst_enable mmx} \
	%{subst_enable nonfree} \
	%{subst_enable ffplay} \
	%{subst_enable ffprobe} \
	--enable-avfilter \
	--enable-avresample \
	%{subst_enable avisynth} \
	%{subst_enable bzlib} \
	%{subst_enable chromaprint} \
	%{subst_enable frei0r} \
	%{subst_enable gnutls} \
	%{subst_enable ladspa} \
	%{subst_enable libaom} \
	%{subst_enable libaribb24} \
	%{subst_enable libass} \
	%{subst_enable libbluray} \
	%{subst_enable libbs2b} \
	%{subst_enable libcaca} \
	%{subst_enable libcdio} \
	%{subst_enable libcelt} \
	%{subst_enable libcodec2} \
	%{subst_enable libdav1d} \
	%{subst_enable libdavs2} \
	%{subst_enable libdc1394} \
	%{subst_enable libdrm} \
	%{subst_enable libflite} \
	%{subst_enable libfontconfig} \
	%{subst_enable libfreetype} \
	%{subst_enable libfribidi} \
	%{subst_enable libglslang} \
	%{subst_enable libgme} \
	%{subst_enable libgsm} \
	%{subst_enable libilbc} \
	%{subst_enable libjack} \
	%{subst_enable libklvanc} \
	%{subst_enable libkvazaar} \
	%{subst_enable liblensfun} \
	%{subst_enable libmfx} \
	%{subst_enable libmodplug} \
	%{subst_enable libmp3lame} \
	%{subst_enable librabbitmq} \
	%{subst_enable libmysofa} \
	%{subst_enable_with libopencore_amrnb libopencore-amrnb} \
	%{subst_enable_with libopencore_amrwb libopencore-amrwb} \
	%{subst_enable libopenjpeg} \
	%{subst_enable libopenmpt} \
	%{subst_enable libopus} \
	%{subst_enable libpulse} \
	%{subst_enable librsvg} \
	%{subst_enable librtmp} \
	%{subst_enable librubberband} \
	%{subst_enable libshine} \
	%{subst_enable libsnappy} \
	%{subst_enable libsoxr} \
	%{subst_enable libspeex} \
	%{subst_enable libssh} \
	%{subst_enable libtesseract} \
	%{subst_enable libtheora} \
	%{subst_enable libtwolame} \
	%{subst_enable libudev} \
	%{subst_enable libv4l2} \
	%{subst_enable libvidstab} \
	%{subst_enable libvmaf} \
	%{subst_enable libvorbis} \
	%{subst_enable libvpx} \
	%{subst_enable libwavpack} \
	%{subst_enable libwebp} \
	%{subst_enable libx264} \
	%{subst_enable libx265} \
	%{subst_enable libxavs2} \
	%{subst_enable libxml2} \
	%{subst_enable libxvid} \
	%{subst_enable libzimg} \
	%{subst_enable libzmq} \
	%{subst_enable libzvbi} \
	%{subst_enable lv2} \
	%{subst_enable omx} \
	%{subst_enable openal} \
	%{subst_enable opencl} \
	%{subst_enable opengl} \
	%{subst_enable pocketsphinx} \
	%{subst_enable sdl2} \
	%{subst_enable vaapi} \
	%{subst_enable vapoursynth} \
	%{subst_enable vdpau} \
	%{subst_enable vulkan} \
	%{subst_enable zlib} \
	%{subst_enable cuvid} \
	--enable-hardcoded-tables \
	--enable-runtime-cpudetect \
%if_enabled debug
	--enable-debug \
%else
	--disable-debug \
%endif
	--disable-stripping \
	--enable-pic \
	--extra-cflags="%optflags" \
	--extra-version='%release' \
	#
%make_build

%install
%makeinstall_std

%files
%doc README.md
%doc MAINTAINERS
%doc Changelog*
%doc LICENSE.md
%_bindir/ffmpeg
%{?_enable_doc:%_man1dir/ffmpeg*}
%_datadir/ffmpeg
%exclude %_datadir/ffmpeg/examples

%if_enabled doc
%files doc
%doc doc/ffmpeg*.html
%doc doc/faq.html
%doc doc/fate.html
%doc doc/general.html
%doc doc/git-howto.html
%doc doc/lib*.html
%doc doc/nut.html
%doc doc/platform.html
%_man3dir/*
%endif

%if_enabled ffplay
%files -n ffplay
%_bindir/ffplay
%{?_enable_doc:%_man1dir/ffplay*}

%if_enabled doc
%files -n ffplay-doc
%doc doc/ffplay*.html
%endif
%endif

%if_enabled ffprobe
%files -n ffprobe
%_bindir/ffprobe
%{?_enable_doc:%_man1dir/ffprobe*}

%if_enabled doc
%files -n ffprobe-doc
%doc doc/ffprobe*.html
%endif
%endif

%if_enabled ffserver
%files -n ffserver
%_bindir/ffserver
%{?_enable_doc:%_man1dir/ffserver*}
%endif

%if_enabled doc
%files -n ffserver-doc
%{?_enable_ffserver:%doc doc/ffserver*.html}
%endif

%files -n libavcodec%avcodecver
%_libdir/libavcodec.so.%{avcodecver}*

%files -n libavcodec-devel
%_includedir/libavcodec
%_libdir/libavcodec.so
%_pkgconfigdir/libavcodec.pc

%files -n libavdevice%avdevicever
%_libdir/libavdevice.so.%{avdevicever}*

%files -n libavdevice-devel
%_includedir/libavdevice
%_libdir/libavdevice.so
%_pkgconfigdir/libavdevice.pc

%files -n libavfilter%avfilterver
%_libdir/libavfilter.so.%{avfilterver}*

%files -n libavfilter-devel
%_includedir/libavfilter
%_libdir/libavfilter.so
%_pkgconfigdir/libavfilter.pc

%files -n libavformat%avformatver
%_libdir/libavformat.so.%{avformatver}*

%files -n libavformat-devel
%_includedir/libavformat
%_pkgconfigdir/libavformat.pc
%_libdir/libavformat.so

%files -n libavutil%avutilver
%_libdir/libavutil.so.%{avutilver}*

%files -n libavutil-devel
%_includedir/libavutil
%_libdir/libavutil.so
%_pkgconfigdir/libavutil.pc

%files -n libpostproc%postprocver
%_libdir/libpostproc.so.%{postprocver}*

%files -n libpostproc-devel
%_includedir/libpostproc
%_libdir/libpostproc.so
%_pkgconfigdir/libpostproc.pc

%files -n libswresample%swresamplever
%_libdir/libswresample.so.%{swresamplever}*

%files -n libswresample-devel
%_includedir/libswresample
%_libdir/libswresample.so
%_pkgconfigdir/libswresample.pc

%files -n libavresample%avresamplever
%_libdir/libavresample.so.%{avresamplever}*

%files -n libavresample-devel
%_pkgconfigdir/libavresample.pc
%_includedir/libavresample
%_libdir/libavresample.so


%files -n libswscale%swscalever
%_libdir/libswscale.so.%{swscalever}*

%files -n libswscale-devel
%_includedir/libswscale
%_libdir/libswscale.so
%_pkgconfigdir/libswscale.pc

%if_enabled static
%files -n libavformat-devel-static
%_libdir/libavformat.a

%files -n libavcodec-devel-static
%_libdir/libavcodec.a

%files -n libavutil-devel-static
%_libdir/libavutil.a

%files -n libswresample-devel-static
%_libdir/libswresample.a

%files -n libavresample-devel-static
%_libdir/libavresample.a

%files -n libswscale-devel-static
%_libdir/libswscale.a

%files -n libavdevice-devel-static
%_libdir/libavdevice.a

%files -n libavfilter-devel-static
%_libdir/libavfilter.a

%files -n libpostproc-devel-static
%_libdir/libpostproc.a

%endif

%changelog
* Wed Dec 22 2021 Michael Shigorin <mike@altlinux.org> 2:4.3.3-alt1.E2K.1
- E2K: applied MCST patches

* Thu Dec 09 2021 Anton Farygin <rider@altlinux.ru> 2:4.3.3-alt1
- 4.3.3 (Fixes: CVE-2020-20446, CVE-2020-20450, CVE-2020-20453,
	CVE-2020-22015, CVE-2020-22019, CVE-2020-22021, CVE-2020-22037,
	CVE-2020-22042, CVE-2021-38114, CVE-2021-38171, CVE-2021-38291)

* Sun Mar 28 2021 Anton Farygin <rider@altlinux.org> 2:4.3.2-alt1
- 4.3.2

* Wed Feb 17 2021 Sergey Bolshakov <sbolshakov@altlinux.ru> 2:4.3.1-alt5
- fixed build on arm arches

* Wed Jan 20 2021 Aleksei Nikiforov <darktemplar@altlinux.org> 2:4.3.1-alt4
- Applied security fixes from upstream (Fixes: CVE-2020-35964, CVE-2020-35965).

* Wed Dec 09 2020 L.A. Kostis <lakostis@altlinux.ru> 2:4.3.1-alt3.2
- Disable cuvid on arm.

* Mon Dec 07 2020 L.A. Kostis <lakostis@altlinux.ru> 2:4.3.1-alt3.1
- Enable cuvid support.

* Mon Aug 03 2020 Sergey Bolshakov <sbolshakov@altlinux.ru> 2:4.3.1-alt3
- enable v4l2 mem2mem and request-api on arm arches

* Wed Jul 22 2020 Vladimir D. Seleznev <vseleznv@altlinux.org> 2:4.3.1-alt2
- Built with support of:
  + chromaprint;
  + frei0r plugins;
  + liblensfun;
  + librabbitmq;
  + libxml2;
  + sdl2;
  + vulkan.

* Mon Jul 13 2020 Anton Farygin <rider@altlinux.ru> 2:4.3.1-alt1
- 4.3.1

* Thu Jun 18 2020 Anton Farygin <rider@altlinux.ru> 2:4.3-alt1
- 4.3

* Mon May 25 2020 Anton Farygin <rider@altlinux.ru> 2:4.2.3-alt1
- 4.2.3 (Fixes: CVE-2019-13312,CVE-2020-12284)

* Thu Apr 30 2020 Vladimir D. Seleznev <vseleznv@altlinux.org> 2:4.2.2-alt2
- Built against libdav1d.

* Thu Jan 09 2020 Anton Farygin <rider@altlinux.ru> 2:4.2.2-alt1
- 4.2.2

* Wed Sep 11 2019 Anton Farygin <rider@altlinux.ru> 2:4.2.1-alt1
- 4.2.1 (Fixes: CVE-2019-15942)

* Sat Aug 10 2019 Anton Farygin <rider@altlinux.ru> 2:4.2-alt1
- 4.1.4 -> 4.2

* Wed Jul 31 2019 Nikita Ermakov <arei@altlinux.org> 2:4.1.4-alt2
- NMU: Remove duplicates of libbluray-devel and libass-devel from BR.

* Tue Jul 23 2019 Anton Farygin <rider@altlinux.ru> 2:4.1.4-alt1
- 4.1.4 (fixes: CVE-2019-12730)

* Sun May 26 2019 Vladimir D. Seleznev <vseleznv@altlinux.org> 2:4.1.3-alt3
- Built with support of:
  + libaom and HAP codecs;
  + bs2b, flite, livl, rubberband and vidstab filters;
  + Direct Rendering Manager;
  + Game Music Emu format;
  + SFTP protocol.

* Fri Apr 19 2019 Michael Shigorin <mike@altlinux.org> 2:4.1.3-alt2
- fixed doc knob (former docs one, renamed for consistency)

* Thu Apr 04 2019 Anton Farygin <rider@altlinux.ru> 2:4.1.3-alt1
- 4.1.3

* Mon Mar 25 2019 Anton Farygin <rider@altlinux.ru> 2:4.1.2-alt1
- 4.1.2 (fixes: CVE-2019-9718, CVE-2019-9721)

* Tue Feb 26 2019 Anton Farygin <rider@altlinux.ru> 2:4.1.1-alt2
- added provides and obsoletes for avplay and avprobe packages (closes: #36109)

* Thu Feb 21 2019 Anton Farygin <rider@altlinux.ru> 2:4.1.1-alt1
- 4.1.1

* Thu Nov 08 2018 Anton Farygin <rider@altlinux.ru> 2:4.1-alt1
- 4.1

* Mon Nov 05 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.3-alt1
- 4.0.3 (fixes: CVE-2018-15822)

* Sat Sep 01 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.2-alt4
- disabled build with librtmp (this library is not supported by anyone)

* Mon Aug 13 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.2-alt3
- fixed build with disabled glpv3 codecs

* Sun Aug 12 2018 Vladimir D. Seleznev <vseleznv@altlinux.org> 2:4.0.2-alt2
- built with new external libraries:
  + libcodec2
  + libjack
  + librsvg
- return changes that were accidentally dropped by one of previous builds:
  + built with new de/encoder: libopus
  + built with new encoders:
    - libass
    - libbluray
    - libcaca
    - libfontconfig
    - libfribidi
    - libopenjpeg
    - libsoxr
    - libzmq
    - libzvbi
    - openal
    - opengl
  + disabled some optimizations on MIPS arch family (by glebfm@)
  + disabled devel-static subpackage build

* Sat Jul 21 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.2-alt1
- 4.0.2

* Mon Jun 25 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.1-alt2
- enabled documentation build

* Fri Jun 22 2018 Anton Farygin <rider@altlinux.ru> 2:4.0.1-alt1
- 4.0 -> 4.0.1

* Thu May 31 2018 Anton Farygin <rider@altlinux.ru> 2:4.0-alt1
- 4.0 

* Wed May 30 2018 Anton Farygin <rider@altlinux.ru> 2:3.3.6-alt3
- rebuilt in new environment

* Thu Mar 15 2018 Vladimir D. Seleznev <vseleznv@altlinux.org> 2:3.3.6-alt2
- built with new de/encoder: libopus
- built with new encoders:
  + libtwolame
  + libwavpack
  + libwebp
- built with new external libraries:
  + libass
  + libbluray
  + libcaca
  + libfontconfig
  + libfribidi
  + libopenjpeg
  + librubberband
  + libsnappy
  + libsoxr
  + libzmq
  + libzvbi
  + openal
  + opengl
- disabled some optimizations on MIPS arch family (by glebfm@)
- disabled devel-static subpackage build

* Tue Jan 23 2018 Anton Farygin <rider@altlinux.ru> 2:3.3.6-alt1
- new version

* Sun Jan 14 2018 Yuri N. Sedunov <aris@altlinux.org> 2:3.3.5-alt1.1
- rebuild against libcdio.so.18

* Sat Oct 28 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.5-alt1
- 3.3.4
- fixes:
   * CVE-2017-15186 double free when ffmpeg parsing an craft AVI file to MKV file using ffvhuff decoder.

* Fri Oct 06 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.4-alt3
- rebuild for libx265 2.5

* Tue Oct 03 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.4-alt2
- rebuild for recent libvpx4 1.6.1

* Mon Sep 18 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.4-alt1
- 3.3.4 with fixes for multiple vilnerabilities (CVE-2017-14054, CVE-2017-14055,
	CVE-2017-14059, CVE-2017-14058, CVE-2017-14057, CVE-2017-14225, CVE-2017-14170,
	CVE-2017-14056, CVE-2017-14222, CVE-2017-14169, CVE-2017-14223, CVE-2017-14171)

* Tue Aug 01 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.3-alt1
- 3.3.3 with fixes for following vulnerabilities:
	* CVE-2017-11399 remote DoS via crafted APE file
	* CVE-2017-11665 remote DoS via crafted RTMP stream
	* CVE-2017-11719 remote DoS via crafted crafted DNxHD file

* Wed Jun 14 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.2-alt1
- 3.3.2

* Sat Jun 03 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.1-alt2
- enabled debuginfo

* Thu May 25 2017 Anton Farygin <rider@altlinux.ru> 2:3.3.1-alt1
- updated to 3.3.1
- cleanup spec

* Sun Aug 21 2016 Vladimir D. Seleznev <vseleznv@altlinux.org> 1:3.1.2-alt1
- Reintroduce to Sisyphus