mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-27 11:32:08 +01:00
67 lines
2.0 KiB
Plaintext
67 lines
2.0 KiB
Plaintext
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
|
|
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
|
|
pkgname=rustup
|
|
pkgver=1.21.1
|
|
pkgrel=0
|
|
pkgdesc="The Rust toolchain installer"
|
|
url="rustup.rs"
|
|
arch="x86_64" # limited by cargo
|
|
license="Apache-2.0"
|
|
makedepends="cargo perl openssl-dev zlib-dev curl-dev"
|
|
options="!check" # Doesn't recognise x86_64-unknown-linux-musl yet
|
|
subpackages="
|
|
$pkgname-bash-completion:bashcomp:noarch
|
|
$pkgname-fish-completion:fishcomp:noarch
|
|
$pkgname-zsh-completion:zshcomp:noarch"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/rustup.rs/archive/$pkgver.tar.gz
|
|
dont-copy-rustup-bin.patch"
|
|
|
|
# It doesn't like our custom triplet
|
|
export RUSTUP_OVERRIDE_BUILD_TRIPLE="x86_64-unknown-linux-musl"
|
|
|
|
build() {
|
|
cargo build --release --features no-self-update --bin rustup-init
|
|
}
|
|
|
|
check() {
|
|
cargo test --release
|
|
}
|
|
|
|
package() {
|
|
install -d "$pkgdir"/usr/bin
|
|
install -m755 target/release/rustup-init "$pkgdir"/usr/bin/
|
|
|
|
ln -s target/release/rustup-init rustup
|
|
./rustup completions zsh > rustup.zsh
|
|
./rustup completions bash > rustup.bash
|
|
./rustup completions fish > rustup.fish
|
|
}
|
|
|
|
bashcomp() {
|
|
pkgdesc="$pkgdesc - bash completion"
|
|
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
|
|
|
|
install -Dm644 "$builddir"/rustup.bash \
|
|
"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
|
|
}
|
|
|
|
fishcomp() {
|
|
pkgdesc="$pkgdesc - fish shell completion"
|
|
install_if="$pkgname=$pkgver-r$pkgrel fish"
|
|
|
|
install -Dm644 "$builddir"/rustup.fish \
|
|
"$subpkgdir"/usr/share/fish/completions/$pkgname.fish
|
|
}
|
|
|
|
zshcomp() {
|
|
pkgdesc="$pkgdesc -zsh completion"
|
|
depends=""
|
|
install_if="$pkgname=$pkgver-r$pkgrel zsh"
|
|
|
|
install -Dm644 "$builddir"/rustup.zsh \
|
|
"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
|
|
}
|
|
sha512sums="c4bac7d7259631cef5f337cec18bffe087e1bed883cd763841e4236f2e51c11b32b5d29b2e60cf3364418e7b9dd53fc2365a9c3c2e203dd19893981718a345ba rustup-1.21.1.tar.gz
|
|
ca28b41a638fe5b1e8b0dcb549bdbed04bada7f41759d14a374dbc6f0823df57c08b65aa4fbce05ced3deafcb96ee3ae38b187ca29e1a9183ee5e91f8577400c dont-copy-rustup-bin.patch"
|