diff --git a/ffmpeg-6.1.1.tar.gz b/ffmpeg-6.1.1.tar.xz similarity index 48% rename from ffmpeg-6.1.1.tar.gz rename to ffmpeg-6.1.1.tar.xz index f39f96da35fcb0364420ca22469c73d2eb2a3b27..3c4a2a241e2ac2b89b177463ec634af90e130612 100644 Binary files a/ffmpeg-6.1.1.tar.gz and b/ffmpeg-6.1.1.tar.xz differ diff --git a/ffmpeg.spec b/ffmpeg.spec index 427f7d9541a113740988e3386fbce81a02a48818..bec469b9e2a97f96af49cb2ed682ed54e94c92db 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global av_codec_soversion 60 %global av_device_soversion 60 @@ -9,26 +9,36 @@ %global swresample_soversion 4 %global swscale_soversion 7 +%global _lto_cflags %{nil} + Name: ffmpeg Version: 6.1.1 Release: %{anolis_release}%{?dist} Summary: A complete, cross-platform solution to record, convert and stream audio and video. -License: GPL -URL: https://github.com/FFmpeg/FFmpeg - -Source0: https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n6.1.1.tar.gz#/%{name}-%{version}.tar.gz - -BuildRequires: rust cargo make gcc gcc-c++ -BuildRequires: giflib giflib-devel -BuildRequires: pkg-config yasm-devel nasm zlib zlib-devel m4 autoconf automake -BuildRequires: libtool gmp gmp-c++ gmp-devel openssl1.1-devel cmake gnutls-devel -BuildRequires: nettle nettle-devel python3 python3-pip meson libdav1d-devel ninja-build -BuildRequires: rav1e-libs rav1e libvpx-devel aom -BuildRequires: lv2-devel pcre-devel pcre lame lame-devel opus opus-devel -BuildRequires: libogg libogg-devel libvorbis libvorbis-devel libtheora libtheora-devel -BuildRequires: libtiff libtiff-devel libpng libpng-devel libwebp libwebp-devel -BuildRequires: libXext-devel python3-sphinx_lv2_theme libaom-devel fdk-aac-free-devel fdk-aac-free -BuildRequires: SDL2 SDL2-devel freetype freetype-devel +License: GPL-3.0-or-later +URL: https://ffmpeg.org +Source0: https://ffmpeg.org/releases/%{name}-%{version}.tar.xz + +BuildRequires: make gcc gcc-c++ +BuildRequires: giflib-devel +BuildRequires: nasm zlib-devel +BuildRequires: libtool openssl-devel +BuildRequires: libdav1d-devel +BuildRequires: libvpx-devel +BuildRequires: lv2-devel lame-devel opus-devel +BuildRequires: libogg-devel libvorbis-devel libtheora-devel +BuildRequires: libtiff-devel libpng-devel libwebp-devel +BuildRequires: libaom-devel fdk-aac-free-devel +BuildRequires: SDL2-devel freetype-devel + +Requires: libavcodec = %{EVR} +Requires: libavdevice = %{EVR} +Requires: libavfilter = %{EVR} +Requires: libavformat = %{EVR} +Requires: libavutil = %{EVR} +Requires: libpostproc = %{EVR} +Requires: libswresample = %{EVR} +Requires: libswscale = %{EVR} %description FFmpeg is a leading multimedia framework, able to decode, encode, transcode, @@ -37,26 +47,16 @@ machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. -Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} -Requires: libavdevice%{?pkg_suffix} = %{version}-%{release} -Requires: libavfilter%{?pkg_suffix} = %{version}-%{release} -Requires: libavformat%{?pkg_suffix} = %{version}-%{release} -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix} = %{version}-%{release} -Requires: libswresample%{?pkg_suffix} = %{version}-%{release} -Requires: libswscale%{?pkg_suffix} = %{version}-%{release} - %package -n %{name}-devel Summary: Development package for %{name} -Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavdevice%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavfilter%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} -Requires: pkgconfig +Requires: libavcodec-devel = %{EVR} +Requires: libavdevice-devel = %{EVR} +Requires: libavfilter-devel = %{EVR} +Requires: libavformat-devel = %{EVR} +Requires: libavutil-devel = %{EVR} +Requires: libpostproc-devel = %{EVR} +Requires: libswresample-devel = %{EVR} +Requires: libswscale-devel = %{EVR} %description -n %{name}-devel FFmpeg is a leading multimedia framework, able to decode, encode, transcode, @@ -65,17 +65,17 @@ machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. -%package -n libavcodec%{?pkg_suffix} +%package -n libavcodec Summary: FFmpeg codec library -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} -Requires: libswresample%{?pkg_suffix} = %{version}-%{release} +Requires: libavutil = %{EVR} +Requires: libswresample = %{EVR} # We dlopen() openh264, so weak-depend on it... ## Note, we can do this because openh264 is provided in a default-enabled ## third party repository provided by Cisco. Recommends: libopenh264.so.%{openh264_soversion}%{?lib64_suffix} Suggests: openh264 -%description -n libavcodec%{?pkg_suffix} +%description -n libavcodec The libavcodec library provides a generic encoding/decoding framework and contains multiple decoders and encoders for audio, video and subtitle streams, and several bitstream filters. @@ -84,45 +84,35 @@ subtitle streams, and several bitstream filters. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavcodec%{?pkg_suffix}-devel +%package -n libavcodec-devel Summary: Development files for FFmpeg's codec library -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig +Requires: libavcodec = %{EVR} -%description -n libavcodec%{?pkg_suffix}-devel +%description -n libavcodec-devel The libavcodec library provides a generic encoding/decoding framework and contains multiple decoders and encoders for audio, video and subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice%{?pkg_suffix} +%package -n libavdevice Summary: FFmpeg device library -Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} -Requires: libavfilter%{?pkg_suffix} = %{version}-%{release} -Requires: libavformat%{?pkg_suffix} = %{version}-%{release} -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libavcodec = %{EVR} +Requires: libavfilter = %{EVR} +Requires: libavformat = %{EVR} +Requires: libavutil = %{EVR} -%description -n libavdevice%{?pkg_suffix} +%description -n libavdevice 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%{?pkg_suffix}-devel +%package -n libavdevice-devel Summary: Development files for FFmpeg's device library -Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavfilter%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavdevice%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig - -%description -n libavdevice%{?pkg_suffix}-devel +Requires: libavdevice = %{EVR} + +%description -n libavdevice-devel 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, @@ -130,42 +120,35 @@ DShow, and ALSA. This subpackage contains the headers for FFmpeg libavdevice. -%package -n libavfilter%{?pkg_suffix} +%package -n libavfilter Summary: FFmpeg audio and video filtering library -Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} -Requires: libavformat%{?pkg_suffix} = %{version}-%{release} -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix} = %{version}-%{release} -Requires: libswresample%{?pkg_suffix} = %{version}-%{release} -Requires: libswscale%{?pkg_suffix} = %{version}-%{release} - -%description -n libavfilter%{?pkg_suffix} +Requires: libavcodec = %{EVR} +Requires: libavformat = %{EVR} +Requires: libavutil = %{EVR} +Requires: libpostproc = %{EVR} +Requires: libswresample = %{EVR} +Requires: libswscale = %{EVR} + +%description -n libavfilter The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. -%package -n libavfilter%{?pkg_suffix}-devel +%package -n libavfilter-devel Summary: Development files for FFmpeg's audio/video filter library -Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavfilter%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig - -%description -n libavfilter%{?pkg_suffix}-devel +Requires: libavfilter = %{EVR} + +%description -n libavfilter-devel The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat%{?pkg_suffix} +%package -n libavformat Summary: FFmpeg's stream format library -Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libavcodec = %{EVR} +Requires: libavutil = %{EVR} -%description -n libavformat%{?pkg_suffix} +%description -n libavformat The libavformat library provides a generic framework for multiplexing and demultiplexing (muxing and demuxing) audio, video and subtitle streams. It encompasses multiple muxers and demuxers for multimedia @@ -175,15 +158,11 @@ container formats. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavformat%{?pkg_suffix}-devel +%package -n libavformat-devel Summary: Development files for FFmpeg's stream format library -Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libavformat%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig +Requires: libavformat = %{EVR} -%description -n libavformat%{?pkg_suffix}-devel +%description -n libavformat-devel The libavformat library provides a generic framework for multiplexing and demultiplexing (muxing and demuxing) audio, video and subtitle streams. It encompasses multiple muxers and demuxers for multimedia @@ -191,23 +170,22 @@ container formats. This subpackage contains the headers for FFmpeg libavformat. -%package -n libavutil%{?pkg_suffix} +%package -n libavutil Summary: FFmpeg's utility library Group: System/Libraries -%description -n libavutil%{?pkg_suffix} +%description -n libavutil The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality (like enumerations for pixel and sample formats). -%package -n libavutil%{?pkg_suffix}-devel +%package -n libavutil-devel Summary: Development files for FFmpeg's utility library -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig +Requires: libavutil = %{EVR} -%description -n libavutil%{?pkg_suffix}-devel +%description -n libavutil-devel The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, @@ -216,70 +194,64 @@ for pixel and sample formats). This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc%{?pkg_suffix} +%package -n libpostproc Summary: FFmpeg post-processing library -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libavutil = %{EVR} -%description -n libpostproc%{?pkg_suffix} +%description -n libpostproc A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. -%package -n libpostproc%{?pkg_suffix}-devel +%package -n libpostproc-devel Summary: Development files for the FFmpeg post-processing library -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libpostproc%{?pkg_suffix} = %{version}-%{release} -Requires: pkgconfig +Requires: libpostproc = %{EVR} -%description -n libpostproc%{?pkg_suffix}-devel +%description -n libpostproc-devel A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample%{?pkg_suffix} +%package -n libswresample Summary: FFmpeg software resampling library -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libavutil = %{EVR} -%description -n libswresample%{?pkg_suffix} +%description -n libswresample The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. -%package -n libswresample%{?pkg_suffix}-devel +%package -n libswresample-devel Summary: Development files for the FFmpeg software resampling library -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswresample%{?pkg_suffix} = %{version}-%{release} +Requires: libswresample = %{EVR} -%description -n libswresample%{?pkg_suffix}-devel +%description -n libswresample-devel The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale%{?pkg_suffix} +%package -n libswscale Summary: FFmpeg image scaling and colorspace/pixel conversion library -Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libavutil = %{EVR} -%description -n libswscale%{?pkg_suffix} +%description -n libswscale The libswscale library performs image scaling and colorspace and pixel format conversion operations. -%package -n libswscale%{?pkg_suffix}-devel +%package -n libswscale-devel Summary: Development files for FFmpeg's image scaling and colorspace library -Provides: libswscale%{?pkg_suffix}-devel = %{version}-%{release} -Conflicts: libswscale%{?pkg_suffix}-devel < %{version}-%{release} -Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} -Requires: libswscale%{?pkg_suffix} = %{version}-%{release} +Requires: libswscale = %{EVR} -%description -n libswscale%{?pkg_suffix}-devel +%description -n libswscale-devel The libswscale library performs image scaling and colorspace and pixel format conversion operations. This subpackage contains the headers for FFmpeg libswscale. %prep -%autosetup -n FFmpeg-n%{version} +%autosetup -n %{name}-%{version} sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure install -m0755 -d _doc/examples cp -a doc/examples/{*.c,Makefile,README} _doc/examples/ @@ -299,11 +271,10 @@ CONFIGURE_OPTIONS+=("--enable-libfdk-aac") CONFIGURE_OPTIONS+=("--enable-libwebp") CONFIGURE_OPTIONS+=("--enable-libfreetype") -CFLAGS="-I$WORKSPACE/include" -LDFLAGS="-L$WORKSPACE/lib" -LDEXEFLAGS="" -EXTRALIBS="-ldl -lpthread -lm -lz" +%set_build_flags + ./configure "${CONFIGURE_OPTIONS[@]}" \ + --arch=%{_arch} \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --datadir=%{_datadir}/%{name} \ @@ -320,28 +291,14 @@ EXTRALIBS="-ldl -lpthread -lm -lz" --enable-nonfree \ --enable-debug \ --extra-cflags="${CFLAGS}" \ - --extra-ldexeflags="${LDEXEFLAGS}" \ - --extra-ldflags="${LDFLAGS}" \ - --extra-libs="${EXTRALIBS}" \ - --pkg-config-flags="--static" \ - --extra-version="${EXTRA_VERSION}" + --extra-ldflags="${LDFLAGS}" %make_build %install - %make_install rm -rf %{buildroot}%{_datadir}/%{name}/examples -%ldconfig_scriptlets -n libavcodec%{?pkg_suffix} -%ldconfig_scriptlets -n libavdevice%{?pkg_suffix} -%ldconfig_scriptlets -n libavfilter%{?pkg_suffix} -%ldconfig_scriptlets -n libavformat%{?pkg_suffix} -%ldconfig_scriptlets -n libavutil%{?pkg_suffix} -%ldconfig_scriptlets -n libpostproc%{?pkg_suffix} -%ldconfig_scriptlets -n libswresample%{?pkg_suffix} -%ldconfig_scriptlets -n libswscle%{?pkg_suffix} - %files -n %{name} %doc CREDITS README.md %{_bindir}/ffmpeg @@ -356,80 +313,80 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples %doc MAINTAINERS doc/APIchanges doc/*.txt %doc _doc/examples -%files -n libavcodec%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libavcodec +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libavcodec.so.%{av_codec_soversion}{,.*} -%files -n libavcodec%{?pkg_suffix}-devel +%files -n libavcodec-devel %{_includedir}/%{name}/libavcodec %{_libdir}/pkgconfig/libavcodec.pc %{_libdir}/libavcodec.so %{_mandir}/man3/libavcodec.3* -%files -n libavdevice%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libavdevice +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libavdevice.so.%{av_device_soversion}{,.*} -%files -n libavdevice%{?pkg_suffix}-devel +%files -n libavdevice-devel %{_includedir}/%{name}/libavdevice %{_libdir}/pkgconfig/libavdevice.pc %{_libdir}/libavdevice.so %{_mandir}/man3/libavdevice.3* -%files -n libavfilter%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libavfilter +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libavfilter.so.%{av_filter_soversion}{,.*} -%files -n libavfilter%{?pkg_suffix}-devel +%files -n libavfilter-devel %{_includedir}/%{name}/libavfilter %{_libdir}/pkgconfig/libavfilter.pc %{_libdir}/libavfilter.so %{_mandir}/man3/libavfilter.3* -%files -n libavformat%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libavformat +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libavformat.so.%{av_format_soversion}{,.*} -%files -n libavformat%{?pkg_suffix}-devel +%files -n libavformat-devel %{_includedir}/%{name}/libavformat %{_libdir}/pkgconfig/libavformat.pc %{_libdir}/libavformat.so %{_mandir}/man3/libavformat.3* -%files -n libavutil%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libavutil +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libavutil.so.%{av_util_soversion}{,.*} -%files -n libavutil%{?pkg_suffix}-devel +%files -n libavutil-devel %{_includedir}/%{name}/libavutil %{_libdir}/pkgconfig/libavutil.pc %{_libdir}/libavutil.so %{_mandir}/man3/libavutil.3* -%files -n libpostproc%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libpostproc +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libpostproc.so.%{postproc_soversion}{,.*} -%files -n libpostproc%{?pkg_suffix}-devel +%files -n libpostproc-devel %{_includedir}/%{name}/libpostproc %{_libdir}/pkgconfig/libpostproc.pc %{_libdir}/libpostproc.so -%files -n libswresample%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libswresample +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libswresample.so.%{swresample_soversion}{,.*} -%files -n libswresample%{?pkg_suffix}-devel +%files -n libswresample-devel %{_includedir}/%{name}/libswresample %{_libdir}/pkgconfig/libswresample.pc %{_libdir}/libswresample.so %{_mandir}/man3/libswresample.3* -%files -n libswscale%{?pkg_suffix} -%license COPYING.GPLv2 LICENSE.md +%files -n libswscale +%license COPYING.GPLv3 LICENSE.md %{_libdir}/libswscale.so.%{swscale_soversion}{,.*} -%files -n libswscale%{?pkg_suffix}-devel +%files -n libswscale-devel %{_includedir}/%{name}/libswscale %{_libdir}/pkgconfig/libswscale.pc %{_libdir}/libswscale.so @@ -437,5 +394,8 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples %changelog +* Wed Jan 17 2024 Funda Wang - 6.1.1-2 +- Cleanup spec + * Thu Jan 4 2024 Zhongling He - 6.1.1-1 -- Init package from upstream \ No newline at end of file +- Init package from upstream