void-packages/srcpkgs/rustup/template
Rasmus Thomsen b079cb8f64 rustup: update to 1.15.0.
* Instead of doing a bad job at symlinking binaries (it doesn't
work if you install new components, e.g. cargo-clippy) install
a file as /etc/profile.d/rustup.sh which sets PATH correctly
2018-12-02 23:19:12 -02:00

37 lines
1.2 KiB
Bash

# Template file for 'rustup'
pkgname=rustup
version=1.15.0
revision=1
wrksrc="${pkgname}.rs-${version}"
build_style=cargo
configure_args="--features no-self-update --bin rustup-init"
hostmakedepends="perl pkg-config"
makedepends="libressl-devel zlib-devel libcurl-devel"
short_desc="The Rust toolchain installer"
maintainer="Daniel Lee Ramírez <dleeram@protonmail.com>"
license="Apache-2.0, MIT"
homepage="https://www.rustup.rs"
distfiles="https://github.com/rust-lang-nursery/${pkgname}.rs/archive/${version}.tar.gz"
checksum=470441d59dbb33f4e3e52e3f7420734dae0066598802c2b3b4f89f5b3a6a9e45
do_install() {
vbin target/${RUST_TARGET}/release/rustup-init rustup
if ! [ "$CROSS_BUILD" ]; then
# generate shell completions
ln -s target/${RUST_TARGET}/release/rustup-init rustup
./rustup completions zsh > rustup.zsh
./rustup completions bash > rustup.bash
./rustup completions fish > rustup.fish
vinstall rustup.zsh 0644 usr/share/zsh/site-functions/ _rustup
vinstall rustup.bash 0644 usr/share/bash-completion/completions/ rustup
vinstall rustup.fish 0644 usr/share/fish/completions/
fi
vinstall ${FILESDIR}/rustup.sh 0644 etc/profile.d/
vdoc README.md
vlicense LICENSE-APACHE
vlicense LICENSE-MIT
}