void-packages/srcpkgs/rustup/template
Érico Rolim 4e253865bf rustup: remove perl hostmakedep.
Was probably required for building openssl. Having the proper
environment set in the rust build_helper forces it to use the system's
library.
2020-06-10 19:39:53 +02:00

39 lines
1.2 KiB
Bash

# Template file for 'rustup'
pkgname=rustup
version=1.21.1
revision=3
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=3dd54cb15313ff01c930ad4e36326f7d60caadd2d6707790d83bea26fbb8bbe1
pre_build() {
cargo update --package openssl-sys --precise 0.9.57
cargo update --package openssl --precise 0.10.29
}
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
}