mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-06 11:02:53 +00:00
65 lines
2.3 KiB
Bash
65 lines
2.3 KiB
Bash
#! /bin/bash
|
|
|
|
# rustc-bootstrap (Chimera Linux) 1.72.0
|
|
# Source: https://repo.chimera-linux.org/distfiles/cargo-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
# Source: https://repo.chimera-linux.org/distfiles/rustc-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
# Source: https://repo.chimera-linux.org/distfiles/rust-std-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# Unpack all three packages
|
|
tar xf pkgs/rustc-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
tar xf pkgs/rust-std-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
tar xf pkgs/cargo-1.72.0-x86_64-chimera-linux-musl.tar.xz
|
|
|
|
# Install rustc
|
|
cd rustc-1.72.0-x86_64-chimera-linux-musl
|
|
sudo ./install.sh --prefix=/opt/rustc --destdir=$BUILD
|
|
cd -
|
|
|
|
# Install rust-std
|
|
cd rust-std-1.72.0-x86_64-chimera-linux-musl
|
|
sudo ./install.sh --prefix=/opt/rustc --destdir=$BUILD
|
|
cd -
|
|
|
|
# Install cargo
|
|
sudo cp -v cargo-1.72.0-x86_64-chimera-linux-musl/cargo $BUILD/opt/rustc/bin/
|
|
|
|
# Clean up
|
|
rm -rf cargo-1.72.0-x86_64-chimera-linux-musl \
|
|
rust-std-1.72.0-x86_64-chimera-linux-musl \
|
|
rustc-1.72.0-x86_64-chimera-linux-musl
|
|
|
|
# Setup link to change rustc versions
|
|
sudo mv -v $BUILD/opt/rustc $BUILD/opt/rustc-1.72.0
|
|
sudo ln -sv rustc-1.72.0 $BUILD/opt/rustc
|
|
|
|
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
# on the right side marks the last column you can put a character in. You must
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
rustc-bootstrap: rustc-bootstrap
|
|
rustc-bootstrap:
|
|
rustc-bootstrap: Rustc built by Chimera Linux. Repacked as a bootstrap for building
|
|
rustc-bootstrap: rust from source.
|
|
rustc-bootstrap:
|
|
rustc-bootstrap: https://repo.chimera-linux.org/distfiles
|
|
rustc-bootstrap:
|
|
rustc-bootstrap:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/rustc-bootstrap-1.7.2-$(uname -m)-chimera.txz &&
|
|
sudo -S rm -rf ${BUILD}/*
|