Use bundled rust deps on RHEL

This commit is contained in:
Kalev Lember 2023-10-02 11:11:17 +02:00
parent 627db3982c
commit a48b01361d

View File

@ -1,5 +1,11 @@
%bcond_without check %bcond_without check
%if 0%{?rhel}
%global bundled_rust_deps 1
%else
%global bundled_rust_deps 0
%endif
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: snapshot Name: snapshot
@ -56,15 +62,19 @@ Take pictures and videos on your computer, tablet, or phone.
%prep %prep
%autosetup -p1 -n snapshot-%{tarball_version} %autosetup -p1 -n snapshot-%{tarball_version}
%if ! 0%{?bundled_rust_deps}
rm -rf vendor rm -rf vendor
%cargo_prep %cargo_prep
%endif
%if ! 0%{?bundled_rust_deps}
%generate_buildrequires %generate_buildrequires
%cargo_generate_buildrequires %cargo_generate_buildrequires
cd aperture cd aperture
%cargo_generate_buildrequires %cargo_generate_buildrequires
cd ~- cd ~-
%endif
%build %build