diff --git a/ffmpeg-6.1.1.tar.gz b/ffmpeg-6.1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f39f96da35fcb0364420ca22469c73d2eb2a3b27 Binary files /dev/null and b/ffmpeg-6.1.1.tar.gz differ diff --git a/ffmpeg.spec b/ffmpeg.spec new file mode 100644 index 0000000000000000000000000000000000000000..427f7d9541a113740988e3386fbce81a02a48818 --- /dev/null +++ b/ffmpeg.spec @@ -0,0 +1,441 @@ +%define anolis_release 1 + +%global av_codec_soversion 60 +%global av_device_soversion 60 +%global av_filter_soversion 9 +%global av_format_soversion 60 +%global av_util_soversion 58 +%global postproc_soversion 57 +%global swresample_soversion 4 +%global swscale_soversion 7 + +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 + +%description +FFmpeg is a leading multimedia framework, able to decode, encode, transcode, +mux, demux, stream, filter and play pretty much anything that humans and +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 + +%description -n %{name}-devel +FFmpeg is a leading multimedia framework, able to decode, encode, transcode, +mux, demux, stream, filter and play pretty much anything that humans and +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} +Summary: FFmpeg codec library +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: libswresample%{?pkg_suffix} = %{version}-%{release} +# 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} +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. + +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif + +%package -n libavcodec%{?pkg_suffix}-devel +Summary: Development files for FFmpeg's codec library +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} +Requires: pkgconfig + +%description -n libavcodec%{?pkg_suffix}-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} +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} + +%description -n libavdevice%{?pkg_suffix} +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 +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 +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. + +This subpackage contains the headers for FFmpeg libavdevice. + +%package -n libavfilter%{?pkg_suffix} +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} +The libavfilter library provides a generic audio/video filtering +framework containing several filters, sources and sinks. + +%package -n libavfilter%{?pkg_suffix}-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 +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} +Summary: FFmpeg's stream format library +Requires: libavcodec%{?pkg_suffix} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} + +%description -n libavformat%{?pkg_suffix} +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 +container formats. + +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif + +%package -n libavformat%{?pkg_suffix}-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 + +%description -n libavformat%{?pkg_suffix}-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 +container formats. + +This subpackage contains the headers for FFmpeg libavformat. + +%package -n libavutil%{?pkg_suffix} +Summary: FFmpeg's utility library +Group: System/Libraries + +%description -n libavutil%{?pkg_suffix} +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 +Summary: Development files for FFmpeg's utility library +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} +Requires: pkgconfig + +%description -n libavutil%{?pkg_suffix}-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, +cryptography and multimedia related functionality (like enumerations +for pixel and sample formats). + +This subpackage contains the headers for FFmpeg libavutil. + +%package -n libpostproc%{?pkg_suffix} +Summary: FFmpeg post-processing library +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} + +%description -n libpostproc%{?pkg_suffix} +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 +Summary: Development files for the FFmpeg post-processing library +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libpostproc%{?pkg_suffix} = %{version}-%{release} +Requires: pkgconfig + +%description -n libpostproc%{?pkg_suffix}-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} +Summary: FFmpeg software resampling library +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} + +%description -n libswresample%{?pkg_suffix} +The libswresample library performs audio conversion between different +sample rates, channel layout and channel formats. + +%package -n libswresample%{?pkg_suffix}-devel +Summary: Development files for the FFmpeg software resampling library +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix} = %{version}-%{release} + +%description -n libswresample%{?pkg_suffix}-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} +Summary: FFmpeg image scaling and colorspace/pixel conversion library +Requires: libavutil%{?pkg_suffix} = %{version}-%{release} + +%description -n libswscale%{?pkg_suffix} +The libswscale library performs image scaling and colorspace and +pixel format conversion operations. + +%package -n libswscale%{?pkg_suffix}-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} + +%description -n libswscale%{?pkg_suffix}-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} +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/ + +%build + +CONFIGURE_OPTIONS=() +CONFIGURE_OPTIONS+=("--enable-libdav1d") +CONFIGURE_OPTIONS+=("--enable-openssl") +CONFIGURE_OPTIONS+=("--enable-libvpx") +CONFIGURE_OPTIONS+=("--enable-libaom") +CONFIGURE_OPTIONS+=("--enable-libmp3lame") +CONFIGURE_OPTIONS+=("--enable-libopus") +CONFIGURE_OPTIONS+=("--enable-libvorbis") +CONFIGURE_OPTIONS+=("--enable-libtheora") +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" +./configure "${CONFIGURE_OPTIONS[@]}" \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --datadir=%{_datadir}/%{name} \ + --docdir=%{_docdir}/%{name} \ + --incdir=%{_includedir}/%{name} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --disable-htmlpages \ + --disable-stripping \ + --enable-shared \ + --disable-static \ + --enable-gpl \ + --enable-version3 \ + --enable-nonfree \ + --enable-debug \ + --extra-cflags="${CFLAGS}" \ + --extra-ldexeflags="${LDEXEFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --extra-libs="${EXTRALIBS}" \ + --pkg-config-flags="--static" \ + --extra-version="${EXTRA_VERSION}" + +%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 +%{_bindir}/ffplay +%{_bindir}/ffprobe +%{_mandir}/man1/ff*.1* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/ffprobe.xsd +%{_datadir}/%{name}/libvpx-*.ffpreset + +%files -n %{name}-devel +%doc MAINTAINERS doc/APIchanges doc/*.txt +%doc _doc/examples + +%files -n libavcodec%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavcodec.so.%{av_codec_soversion}{,.*} + +%files -n libavcodec%{?pkg_suffix}-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 +%{_libdir}/libavdevice.so.%{av_device_soversion}{,.*} + +%files -n libavdevice%{?pkg_suffix}-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 +%{_libdir}/libavfilter.so.%{av_filter_soversion}{,.*} + +%files -n libavfilter%{?pkg_suffix}-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 +%{_libdir}/libavformat.so.%{av_format_soversion}{,.*} + +%files -n libavformat%{?pkg_suffix}-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 +%{_libdir}/libavutil.so.%{av_util_soversion}{,.*} + +%files -n libavutil%{?pkg_suffix}-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 +%{_libdir}/libpostproc.so.%{postproc_soversion}{,.*} + +%files -n libpostproc%{?pkg_suffix}-devel +%{_includedir}/%{name}/libpostproc +%{_libdir}/pkgconfig/libpostproc.pc +%{_libdir}/libpostproc.so + +%files -n libswresample%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libswresample.so.%{swresample_soversion}{,.*} + +%files -n libswresample%{?pkg_suffix}-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 +%{_libdir}/libswscale.so.%{swscale_soversion}{,.*} + +%files -n libswscale%{?pkg_suffix}-devel +%{_includedir}/%{name}/libswscale +%{_libdir}/pkgconfig/libswscale.pc +%{_libdir}/libswscale.so +%{_mandir}/man3/libswscale.3* + + +%changelog +* Thu Jan 4 2024 Zhongling He - 6.1.1-1 +- Init package from upstream \ No newline at end of file