Andreas Schneider 2021-07-09 12:13:57 +00:00 committed by Git OBS Bridge
parent eaf8ddf9dc
commit 1736ace1f2

View File

@ -28,12 +28,14 @@ URL: https://github.com/xiph/rav1e
# #
Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz Source1: vendor.tar.xz
Source2: cargo_config
Source98: README.suse-maint Source98: README.suse-maint
Source99: baselibs.conf Source99: baselibs.conf
# #
# Fix squared artefacts on image when converting to AVIF # Fix squared artefacts on image when converting to AVIF
Patch0: https://github.com/xiph/rav1e/commit/f553646d70fba8e265d436103a73520eb7adec8c.patch Patch0: https://github.com/xiph/rav1e/commit/f553646d70fba8e265d436103a73520eb7adec8c.patch
# #
BuildRequires: cargo
BuildRequires: cargo-c BuildRequires: cargo-c
BuildRequires: nasm BuildRequires: nasm
BuildRequires: rust-packaging BuildRequires: rust-packaging
@ -93,8 +95,6 @@ directory = './vendor'
rustc = "%{__rustc}" rustc = "%{__rustc}"
rustdoc = "%{__rustdoc}" rustdoc = "%{__rustdoc}"
rustflags = %{__global_rustflags_toml} rustflags = %{__global_rustflags_toml}
[install]
root = '%{buildroot}%{_prefix}'
[term] [term]
verbose = true verbose = true
EOF EOF
@ -105,21 +105,22 @@ sed -i 's/"rav1e_js", //' Cargo.toml
%build %build
export RUSTFLAGS=%{rustflags} export RUSTFLAGS=%{rustflags}
%{cargo_build} cargo build --offline --release
CFLAGS="%{optflags}" %{__cargo} cbuild CFLAGS="%{optflags}" cargo cbuild
%install %install
export RUSTFLAGS=%{rustflags} export RUSTFLAGS=%{rustflags}
%{cargo_install} cargo install --offline --root=%{buildroot}%{_prefix} --path .
rm -rf %{buildroot}%{_datadir}/cargo rm -rf %{buildroot}%{_datadir}/cargo
%{__cargo} cinstall \ cargo cinstall \
--destdir=%{buildroot} \ --destdir=%{buildroot} \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--includedir=%{_includedir} \ --includedir=%{_includedir} \
--pkgconfigdir=%{_libdir}/pkgconfig --pkgconfigdir=%{_libdir}/pkgconfig
rm -f %{buildroot}%{_libdir}/librav1e.a rm -f %{buildroot}%{_libdir}/librav1e.a
rm -f %{buildroot}%{_prefix}/.crates*
%post -n librav1e0 -p /sbin/ldconfig %post -n librav1e0 -p /sbin/ldconfig
%postun -n librav1e0 -p /sbin/ldconfig %postun -n librav1e0 -p /sbin/ldconfig