diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template index 3cf8ccf6b7..6472ae1f10 100644 --- a/srcpkgs/rustup/template +++ b/srcpkgs/rustup/template @@ -1,8 +1,9 @@ # Template file for 'rustup' pkgname=rustup version=1.22.1 -revision=1 +revision=2 build_style=cargo +build_helper=qemu configure_args="--features no-self-update --bin rustup-init" hostmakedepends="pkg-config" makedepends="libressl-devel zlib-devel libcurl-devel" @@ -13,19 +14,25 @@ homepage="https://www.rustup.rs" distfiles="https://github.com/rust-lang/${pkgname}/archive/${version}.tar.gz" checksum=ad46cc624f318a9493aa62fc9612a450564fe20ba93c689e0ad856bff3c64c5b +post_build() { + # rustup errors out because it doesn't know about armv6l-musl + if [ "$XBPS_TARGET_MACHINE" != armv6l-musl ]; then + RUSTUP="target/${RUST_TARGET}/release/rustup-init" + ln -sf "$RUSTUP" rustup + # generate shell completions + vtargetrun ./rustup completions zsh >rustup.zsh + vtargetrun ./rustup completions bash >rustup.bash + vtargetrun ./rustup completions fish >rustup.fish + fi +} + 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/ + if [ "$XBPS_TARGET_MACHINE" != armv6l-musl ]; then + vcompletion rustup.bash bash + vcompletion rustup.fish fish + vcompletion rustup.zsh zsh fi vdoc README.md