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.
This commit is contained in:
Yaakov Selkowitz 2023-11-14 19:08:40 -05:00
parent 0e1b42ef48
commit 58f33f726a
1 changed files with 8 additions and 0 deletions

View File

@ -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