aports/testing/rustic/APKBUILD

51 lines
1.5 KiB
Plaintext

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=rustic
# NOTE: do not move out of the testing repository until upstream says it's no longer beta-quality software
pkgver=0.5.4
pkgrel=1
pkgdesc="Fast, encrypted, deduplicated backups"
url="https://github.com/rustic-rs/rustic"
license="MIT OR Apache-2.0"
arch="all !ppc64le !riscv64" # fails to build ring crate
arch="$arch !s390x" # fails to build nix crate
makedepends="cargo cargo-auditable"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="https://github.com/rustic-rs/rustic/archive/v$pkgver/rustic-$pkgver.tar.gz"
options="net" # fetch dependencies
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo auditable build --frozen --release
target/release/rustic completions bash > $pkgname.bash
target/release/rustic completions fish > $pkgname.fish
target/release/rustic completions zsh > $pkgname.zsh
}
check() {
cargo test --frozen
}
package() {
install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname
install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish
install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
}
sha512sums="
6dffb26f17ebd5145cd3cff989dbb8439639362880e2e47dd997a99b0eae78e8f07858bb1cde81404ab07658dd5b1c59007b01ccaf6f6a69f98e903cf4e84cbc rustic-0.5.4.tar.gz
"