File rust-bin.spec of Package rust-bin-aarch64

%define __os_install_post %{nil}
Name:           rust-bin
Version:        1.89.0
Release:        1%{?dist}
Summary:        A systems programming language
License:        Apache-2.0 OR MIT
Group:          Development/Languages/Rust
URL:            https://forge.rust-lang.org/infra/other-installation-methods.html#standalone
%ifarch x86_64
Source0:        rust-%{version}-x86_64-unknown-linux-gnu.tar.gz
%endif
%ifarch aarch64
Source0:        rust-%{version}-aarch64-unknown-linux-gnu.tar.gz
%endif
ExclusiveArch:  x86_64 aarch64

BuildRequires:  bash, tar, gzip
Provides:       rust = %{version}
Provides:       cargo = %{version}

%description
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency.

⚠️  This is the Rust toolchain intended for build pipelines. If you
want to install Rust for a development environment, you should install
'rustup' instead.

%prep
tar xf %{SOURCE0} --strip-components=1

%build

%install
./install.sh --prefix=%{buildroot}/%{_prefix} --components=rustc,cargo,rust-std-%{_arch}-unknown-linux-gnu
mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}
rm %{buildroot}%{_prefix}/lib/rustlib/install.log
rm %{buildroot}%{_prefix}/lib/rustlib/manifest-*

%files
%defattr(-,root,root,-)
%{_bindir}/*{cargo,rust}*
%{_sysconfdir}/bash_completion.d/cargo
%{_mandir}/man1/{cargo,rust}*
%{_datadir}/doc/{cargo,rust}
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_cargo
%dir %{_prefix}/libexec
%{_prefix}/libexec/*
%{_prefix}/lib/rustlib
%{_prefix}/lib/libLLVM*
%{_prefix}/lib/{libchalk,libcstr,libproc,librustc,libserde,libthiserror,libtracing,libunic}*.so

%changelog
openSUSE Build Service is sponsored by