void-packages/srcpkgs/rustup/template
Jan Christian Grünhage 6dca1aba22 rustup: update to 1.22.0.
2020-07-07 23:08:33 +02:00

34 lines
1.1 KiB
Bash

# Template file for 'rustup'
pkgname=rustup
version=1.22.0
revision=1
build_style=cargo
configure_args="--features no-self-update --bin rustup-init"
hostmakedepends="pkg-config"
makedepends="libressl-devel zlib-devel libcurl-devel"
short_desc="Rust toolchain installer"
maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
license="Apache-2.0, MIT"
homepage="https://www.rustup.rs"
distfiles="https://github.com/rust-lang/${pkgname}/archive/${version}.tar.gz"
checksum=1810c0b12f32d85cd0302c1cc73b88893fb8aa7f20ec22cb4bf53ed25bb130fe
do_install() {
vbin target/${RUST_TARGET}/release/rustup-init
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/vendor_completions.d/
fi
vdoc README.md
vlicense LICENSE-APACHE
vlicense LICENSE-MIT
}