mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-01 14:52:14 +01:00
74 lines
2.2 KiB
Plaintext
74 lines
2.2 KiB
Plaintext
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
|
|
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
|
|
pkgname=rustup
|
|
pkgver=1.25.2
|
|
pkgrel=4
|
|
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
|
|
getrandom-0.2.10.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
|
|
d056c8ecb485bf5be6724a897bb47b0cb4b2c8d97d50ca3136edbaedba2e8da9fb8cea1f87bb8fa9e1f934d40097ec1ab17724f69aeb7ce3437ba2e41c49f2f6 getrandom-0.2.10.patch
|
|
914fe463454fe5026569200823153b98b659cdfe1c169823af16fe5b01f8e68194804c16f7d2d2fa167daac5727572d0b14e2969ed0e0afbabf2d8a881bdac94 system.patch
|
|
"
|