diff options
Diffstat (limited to 'packaging/rust.spec')
-rw-r--r-- | packaging/rust.spec | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packaging/rust.spec b/packaging/rust.spec index 0c7a4971ec3..e9288e4cf3f 100644 --- a/packaging/rust.spec +++ b/packaging/rust.spec @@ -23,6 +23,7 @@ Source12: rust-%{version}-arm-unknown-linux-gnueabi.tar.gz Source13: rust-%{version}-aarch64-unknown-linux-gnu.tar.gz Source14: rust-%{version}-armv7-unknown-linux-gnueabihf.tar.gz Source15: rust-%{version}-riscv64gc-unknown-linux-gnu.tar.gz +Source16: rust-std-%{version}-riscv64gc-unknown-none-elf.tar.gz Source100: macros.rust-toolset Source1001: rust.manifest @@ -137,6 +138,30 @@ rm -f %{buildroot}%{rustlibdir}/rust-installer-version rm -f %{buildroot}%{rustlibdir}/uninstall.sh rm -rf %{buildroot}%{rustdocdir} +%ifarch riscv64 +gzip -dc %{SOURCE16} | tar -xvf - +dir_name=$(basename %{SOURCE16} .tar.gz) + +if [ "${dir_name}" -eq "" ]; +then + echo "[Error] rust dir name invalid" + exit 1; +fi + +pushd ${dir_name} +./install.sh --prefix=%{buildroot}%{_prefix} \ + --libdir=%{buildroot}%{_libdir} \ + --disable-ldconfig + +popd + +rm -f %{buildroot}%{rustlibdir}/install.log +rm -f %{buildroot}%{rustlibdir}/manifest-* +rm -f %{buildroot}%{rustlibdir}/components +rm -f %{buildroot}%{rustlibdir}/rust-installer-version +rm -f %{buildroot}%{rustlibdir}/uninstall.sh +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig |