%global git_date 20241015 %global git_hash 0b743163 %global git_ver 0.7.1 %global rel 1 %global src_name %{name}-%{git_date}-%{git_hash}.tar.xz %define debug_package %{nil} %global common_description %{expand: rav1e is an experimental AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.} Name: rav1e Version: %{git_ver}^%{git_date}g%{git_hash} ##Version: 0.7.0^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: The fastest and safest AV1 encoder License: BSD URL: https://github.com/xiph/rav1e Source0: %{url}/%{src_name} #Patch0: rav1e-cargo-features.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging BuildRequires: gcc-c++ BuildRequires: gcc BuildRequires: cmake3 BuildRequires: git-core BuildRequires: perl-interpreter BuildRequires: perl(Getopt::Long) BuildRequires: nasm BuildRequires: cargo-c %description %{common_description} %package libs Summary: libs for %{name}. %description libs libs for %{name}. %package devel Summary: devel files for %{name}. Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel devel files for %{name}. %prep %autosetup -p1 -n %{name} %build cargo build --release ##cargo --verbose build --release \ # --destdir=%{buildroot} \ # --prefix=%{_prefix} \ # --libdir=%{_libdir} \ # --includedir=%{_includedir} \ # --pkgconfigdir=%{_libdir}/pkgconfig %install cargo install --root=%{buildroot}%{_prefix} --path=. --no-track cargo cinstall --release \ --destdir=%{buildroot} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --includedir=%{_includedir} \ --pkgconfigdir=%{_libdir}/pkgconfig rm -v %{buildroot}%{_libdir}/librav1e.a %files %doc README.md %license LICENSE PATENTS %{_bindir}/rav1e %files libs %license LICENSE PATENTS %{_libdir}/librav1e.so.0* %files devel %{_includedir}/%{name}/ %{_libdir}/librav1e.so %{_libdir}/pkgconfig/rav1e.pc %changelog %autochangelog