%bcond_with check %global forgeurl https://github.com/gianni-rosato/svt-av1-psy %global version0 2.3.0 %global tag v%{version0} %forgemeta Name: svt-av1-psy Version: %forgeversion Release: %autorelease Summary: SVT-AV1 with perceptual enhancements optimal AV1 encoding License: %{shrink: LicenseRef-BSD-2-Clause-WITH-AdditionRef-AOMPL-1.0 AND LicenseRef-BSD-3-Clause-Clear-WITH-AdditionRef-AOMPL-1.0 AND ISC AND BSD-2-Clause AND BSD-3-Clause AND MIT} URL: %{forgeurl} Source: %{forgesource} #main library is a tangled mixture of `LicenseRef-BSD-2-Clause-WITH-AdditionRef-AOMPL-1.0` and `LicenseRef-BSD-3-Clause-Clear-WITH-AdditionRef-AOMPL-1.0` in order to avoid the long breakdown BuildRequires: cmake BuildRequires: nasm BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libdovi-devel BuildRequires: ninja-build #ninja-build is faster BuildRequires: cpuinfo-devel Provides: bundled(fastfeat) Provides: bundled(safestringlib) Conflicts: svt-av1 # same install dir, same file names... just without the Decoder files... "Use Dav1d" they said # the psy version is just svt + extra speccial sauce to make it better %description NOTE: not compiled with hdr10plus SVT-AV1-PSY is the Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) with perceptual enhancements for psychovisually optimal AV1 encoding. # no devel packages as they have `Provides:` conflict and they are abi-compatible # build against sv-av1-devel and switch libs at runtime %package docs Summary: Docs for %{name} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} BuildArch: noarch %description docs The %{name}-docs package contains the docs %prep %forgesetup #mitigate name collisions mv third_party/safestringlib/LICENSE third_party/safestringlib/LICENSE.safestringlib mv third_party/fastfeat/LICENSE third_party/fastfeat/LICENSE.fastfeat mv Docs/README.md Docs/Docs.README.md #sanitize third_party rm -rf third_party/cpuinfo rm -rf third_party/aom* rm -rf third_party/googletest %build # # Not doing tests as it will cause build to time out and crash the build #TODO: investigate -DSVT_AV1_PGO=ON , -DENABLE_AVX512=ON REPRODUCIBLE_BUILDS EXCLUDE_HASH # DSVT_AV1_PGO - implication of it seem quite complicated # DENABLE_AVX512 is wrongly defined %cmake -DLIBDOVI_FOUND=1 \ -DSVT_AV1_LTO=ON \ -DUSE_EXTERNAL_CPUINFO=ON \ -DCMAKE_BUILD_TYPE=Release \ -G Ninja %cmake_build %install %cmake_install #stop builder fom complaining for not packagig devel files rm -rf %{buildroot}/usr/lib64/pkgconfig/SvtAv1Enc.pc rm -rf %{buildroot}/usr/lib64/libSvtAv1Enc.so rm -rf %{buildroot}/usr/include/svt-av1/* %if %{with check} %check %ctest %endif %files %license LICENSE.md PATENTS.md third_party/fastfeat/LICENSE.fastfeat third_party/safestringlib/LICENSE.safestringlib %{_libdir}/libSvtAv1Enc.so.2{,.*} %{_bindir}/SvtAv1EncApp %files docs %doc CHANGELOG.md README.md Docs/ %changelog %autochangelog