From fc56ff934284cfa31a8a47beb98f16d5e7130cd0 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 1 Feb 2024 15:37:21 -0500 Subject: [PATCH] Update Rust macro usage The rust-toolset macros in RHEL 10 are now compatible with Fedora's in terms of handling vendoring and automatic generation of license information and bundled provides. --- snapshot.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/snapshot.spec b/snapshot.spec index 221dc99..3944d1b 100644 --- a/snapshot.spec +++ b/snapshot.spec @@ -69,7 +69,9 @@ Take pictures and videos on your computer, tablet, or phone. %prep %autosetup -p1 -n snapshot-%{tarball_version} -%if ! 0%{?bundled_rust_deps} +%if 0%{?bundled_rust_deps} +%cargo_prep -v vendor +%else rm -rf vendor %cargo_prep %endif @@ -88,9 +90,10 @@ cd ~- %meson %meson_build -%if ! 0%{?rhel} %cargo_license_summary %{cargo_license} > LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%cargo_vendor_manifest %endif @@ -111,8 +114,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Snapshot %files -f snapshot.lang %license LICENSE -%if ! 0%{?rhel} %license LICENSE.dependencies +%if 0%{?bundled_rust_deps} +%license cargo-vendor.txt %endif %doc README.md %{_bindir}/snapshot