# Contributor: Rasmus Thomsen # Maintainer: Rasmus Thomsen pkgname=rustup pkgver=1.25.2 pkgrel=3 pkgdesc="Rust toolchain installer" url="https://rustup.rs/" arch="aarch64 x86_64" # limited by upstream only supporting these arches license="Apache-2.0" makedepends=" cargo cargo-auditable curl-dev openssl-dev>3 perl zlib-dev zstd-dev " options="!check" # Doesn't recognise x86_64-unknown-linux-musl yet subpackages=" $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source=" $pkgname-$pkgver.tar.gz::https://github.com/rust-lang/rustup.rs/archive/$pkgver.tar.gz dont-copy-rustup-bin.patch system.patch " # It doesn't like our custom triplet export RUSTUP_OVERRIDE_BUILD_TRIPLE="$CARCH-unknown-linux-musl" prepare() { default_prepare cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build --release --frozen \ --no-default-features \ --features no-self-update,curl-backend,reqwest-default-tls,reqwest-backend \ --bin rustup-init ln -s target/release/rustup-init rustup ./rustup completions zsh > rustup.zsh ./rustup completions bash > rustup.bash ./rustup completions fish > rustup.fish } check() { cargo test --frozen } package() { install -Dm755 target/release/rustup-init -t "$pkgdir"/usr/bin/ install -Dm644 rustup.bash \ "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 rustup.fish \ "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 rustup.zsh \ "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" 77268322224816c84c1a17f125cce10e0bfddae857f1e71885d9999f1415c567ee508f93367dd6adca62a92092c2869957206d4c707d20da461e2866fdc74e67 rustup-1.25.2.tar.gz 1db6d3833327d8c6329bd8a0ed4704b0dd0c6e34e1b3753ab2d34506f5e318129571116612a2bcc58d12f553b466a91302966e40ed2e2b661d2b0ab6c8eaa51a dont-copy-rustup-bin.patch 914fe463454fe5026569200823153b98b659cdfe1c169823af16fe5b01f8e68194804c16f7d2d2fa167daac5727572d0b14e2969ed0e0afbabf2d8a881bdac94 system.patch "