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 12:57:54 -05:00
parent 535fdd48d6
commit de1405fe75

View File

@ -40,7 +40,11 @@ Patch: 302.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: itstool BuildRequires: itstool
BuildRequires: meson BuildRequires: meson
%if 0%{?bundled_rust_deps} %if 0%{?bundled_rust_deps}
@ -93,8 +97,10 @@ sed -i -e '/Cargo.lock/d' meson.build
%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
@ -114,7 +120,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Loupe.de
%files -f loupe.lang %files -f loupe.lang
%license COPYING.md %license COPYING.md
%if ! 0%{?rhel}
%license LICENSE.dependencies %license LICENSE.dependencies
%endif
%doc NEWS README.md %doc NEWS README.md
%{_bindir}/loupe %{_bindir}/loupe
%{_datadir}/applications/org.gnome.Loupe.desktop %{_datadir}/applications/org.gnome.Loupe.desktop