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

View File

@ -43,7 +43,11 @@ Patch: 175.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86} ExcludeArch: %{ix86}
%if 0%{?rhel}
BuildRequires: rust-toolset
%else
BuildRequires: cargo-rpm-macros BuildRequires: cargo-rpm-macros
%endif
BuildRequires: meson BuildRequires: meson
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-1.0)
@ -87,8 +91,10 @@ cd ~-
%meson %meson
%meson_build %meson_build
%if ! 0%{?rhel}
%cargo_license_summary %cargo_license_summary
%{cargo_license} > LICENSE.dependencies %{cargo_license} > LICENSE.dependencies
%endif
%install %install
@ -108,7 +114,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Snapshot
%files -f snapshot.lang %files -f snapshot.lang
%license LICENSE %license LICENSE
%if ! 0%{?rhel}
%license LICENSE.dependencies %license LICENSE.dependencies
%endif
%doc README.md %doc README.md
%{_bindir}/snapshot %{_bindir}/snapshot
%{_datadir}/applications/org.gnome.Snapshot.desktop %{_datadir}/applications/org.gnome.Snapshot.desktop