# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=choose
pkgver=1.3.6
pkgrel=0
pkgdesc="A human-friendly and fast alternative to cut and (sometimes) awk"
url="https://github.com/theryangeary/choose"
arch="all"
license="GPL-3.0-or-later"
makedepends="cargo cargo-auditable"
source="https://github.com/theryangeary/choose/archive/v$pkgver/choose-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/choose -t "$pkgdir"/usr/bin/
}

sha512sums="
c2e45999abf577060f6a6ca34b8f801ba3f1f654b5526635908de34d6f3ad25b4a67b5868bcf55fca9dae6551da04ef1c972ee80235bd62cd5bbab46a0d8a913  choose-1.3.6.tar.gz
"
