diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2023-09-15 18:40:06 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-24 11:55:18 +0700 |
commit | 7142708e82e8c8bdf2d058fc4822d1c49614c52b (patch) | |
tree | 646703c8dba6766c20414ea0d96eb7485e20dd3d /development/rustup | |
parent | 8f828bc99d569a5ffa308b5cfb12da3f2c5d9929 (diff) |
development/rustup: Align packaging with upstream.
This now packages rustup as upstream expects. There is only a binary
called rustup-init in /usr now which each user sets up to have
rustup be the handler for rustc/cargo etc for that user.
The previous instructions with manually setting up links have been
superseded.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/rustup')
-rw-r--r-- | development/rustup/README | 20 | ||||
-rw-r--r-- | development/rustup/rustup.SlackBuild | 11 |
2 files changed, 8 insertions, 23 deletions
diff --git a/development/rustup/README b/development/rustup/README index 70d31e61fa..c56a141e55 100644 --- a/development/rustup/README +++ b/development/rustup/README @@ -1,20 +1,4 @@ rustup - The Rust toolchain installer -If you want to use the versions of rust installed through rustup by -default for everything, you'll need to add links to the rustup binary -on your path before the system rust. - -You are free to choose where, but here is an example for a single user: - -mkdir -p $HOME/.rustup/shims -for lnk in cargo cargo-clippy cargo-fmt cargo-miri clippy-driver \ -rls rust-gdb rust-lldb rustc rustdoc rustfmt -do - ( - cd $HOME/.rustup/shims - ln -s /usr/bin/rustup $lnk - ) -done - -Then add the directory to your path (.bashrc for example): -export PATH="$HOME/.rustup/shims:$PATH" +This follows the upstream installation. After installing this +package, run rustup-init as your user and follow the instructions. diff --git a/development/rustup/rustup.SlackBuild b/development/rustup/rustup.SlackBuild index 420d9f4215..0343ac981b 100644 --- a/development/rustup/rustup.SlackBuild +++ b/development/rustup/rustup.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=rustup VERSION=${VERSION:-1.26.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -152,17 +152,18 @@ cargo build --offline --release --features no-self-update $CARGOTARGET mkdir -p $PKG/usr/bin/ -find target -name rustup-init -exec install -m 755 {} $PKG/usr/bin/rustup \; +find target -name rustup-init -exec install -m 755 {} $PKG/usr/bin/rustup-init \; find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +ln -s $PKG/usr/bin/rustup-init rustup # so we can generate completions + mkdir -p $PKG/usr/share/bash-completion/completions -$PKG/usr/bin/rustup completions bash > $PKG/usr/share/bash-completion/completions/rustup +./rustup completions bash > $PKG/usr/share/bash-completion/completions/rustup mkdir -p $PKG/usr/share/zsh/site-functions -$PKG/usr/bin/rustup completions zsh > $PKG/usr/share/zsh/site-functions/_rustup - +./rustup completions zsh > $PKG/usr/share/zsh/site-functions/_rustup chmod 0644 $PKG/usr/share/zsh/site-functions/_rustup $PKG/usr/share/bash-completion/completions/rustup mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |