From 58f33f726aaf71af5d5c970714caf613c65e674d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 14 Nov 2023 19:08:40 -0500 Subject: [PATCH] Fix RHEL build The RHEL rust-toolset macros are currently way behind Fedora rust-packaging. While work is underway to get them in sync, this package still needs to be buildable in the meantime. --- snapshot.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snapshot.spec b/snapshot.spec index 5893052..3b753d9 100644 --- a/snapshot.spec +++ b/snapshot.spec @@ -43,7 +43,11 @@ Patch: 175.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} +%if 0%{?rhel} +BuildRequires: rust-toolset +%else BuildRequires: cargo-rpm-macros +%endif BuildRequires: meson BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gstreamer-1.0) @@ -87,8 +91,10 @@ cd ~- %meson %meson_build +%if ! 0%{?rhel} %cargo_license_summary %{cargo_license} > LICENSE.dependencies +%endif %install @@ -108,7 +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 +%endif %doc README.md %{_bindir}/snapshot %{_datadir}/applications/org.gnome.Snapshot.desktop