diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-05-02 21:17:24 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-10 17:37:49 +0000 |
commit | 1bdcacee186d4655c1be36253374c1b752b051fa (patch) | |
tree | d96416e05d305198860e7b84c4e8974de762a9b3 | |
parent | a4cf91d189f156f6edb1b4809c532284a7a57f49 (diff) | |
download | aports-1bdcacee186d4655c1be36253374c1b752b051fa.tar.bz2 aports-1bdcacee186d4655c1be36253374c1b752b051fa.tar.xz |
testing/rustup: new aport
-rw-r--r-- | testing/rustup/APKBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/rustup/APKBUILD b/testing/rustup/APKBUILD new file mode 100644 index 0000000000..231269082b --- /dev/null +++ b/testing/rustup/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Rasmus Thomsen <oss@cogitri.dev> +# Maintainer: Rasmus Thomsen <oss@cogitri.dev> +pkgname=rustup +pkgver=1.16.0 +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, so it tries + # to test with nonexistent x86_64-unknown-linux +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" +builddir="$srcdir/rustup.rs-${pkgver}" + +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" + depends="" + 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="413aada75d90b7c8946edd62e05c526f65e7b34899ac4afe711ba79ab2a1e3e6366c84a3b5996df7de804ef6db98d571ad4aa4bc3f46faed30ebf6eb2ac7e58c rustup-1.16.0.tar.gz" |