%global forgeurl https://github.com/FFMS/ffms2 %global tag 5.0 Version: 5.0 %forgemeta Name: ffms2 Release: %autorelease License: MIT Summary: Video source library for easy frame accurate access URL: %{forgeurl} Source0: %{forgesource} # run ffms2-samples-download.sh to fetch samples from upstream Source1: ffms2-samples-download.sh Source2: ffms2-samples.tar.zst Patch: ffms2-use-system-vapoursynth.patch Patch: ffms2-use-system-gtest.patch Patch: ffms2-skip-unsupported-codec-test.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: automake BuildRequires: gtest-devel BuildRequires: libtool BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(vapoursynth) BuildRequires: pkgconfig(zlib) %description FFmpegSource (usually known as FFMS or FFMS2) is a cross-platform wrapper library around FFmpeg. It gives you an easy, convenient way to say "open and decompress this media file for me, I don't care how you do it" and get frame- and sample-accurate access (usually), without having to bother with the sometimes less than straightforward and less than perfectly documented FFmpeg API. %package devel Summary: Development package for ffms2 Requires: ffms2%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel FFmpegSource (usually known as FFMS or FFMS2) is a cross-platform wrapper library around FFmpeg. This package contains the headers and development files. %prep %autosetup -p1 pushd test tar --zstd -xvf %SOURCE2 popd rm -rv src/vapoursynth mkdir -p src/config autoreconf -vfi %build %configure \ --enable-shared=yes \ --enable-static=no \ --disable-silent-rules %make_build %install %make_install rm -rv %{buildroot}%{_docdir} %check # HDR test uses unsupported H.265 codec samples, so run only the other two tests CPPFLAGS=-I/usr/include/ffmpeg make -C test SAMPLES_DIR=$(pwd)/test/samples TESTS="indexer display_matrix" run %files %license COPYING %doc README.md %{_bindir}/ffmsindex %{_libdir}/libffms2.so.5{,.*} %files devel %doc doc/* %{_libdir}/libffms2.so %{_includedir}/ffms{,compat}.h %{_libdir}/pkgconfig/ffms2.pc %changelog %autochangelog