# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gfold
pkgver=4.5.0
pkgrel=0
pkgdesc="CLI tool to help keep track of Git repositories"
url="https://github.com/nickgerace/gfold"
license="Apache-2.0"
arch="all"
makedepends="cargo cargo-auditable"
options="net"
source="https://github.com/nickgerace/gfold/archive/$pkgver/gfold-$pkgver.tar.gz"

prepare() {
	default_prepare

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

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

check() {
	git init # needed for the integration test
	cargo test --frozen --workspace
}

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

sha512sums="
5f35aff3b617a8aa513c2e9636f5f921de718a134a7ed9c6ab81a3f8e38ed9b230d629503448aa49e685220a24675c78ee0757e85e80e814b6c76a16f1a7dfc0  gfold-4.5.0.tar.gz
"
