# Maintainer: Michał Polański <michal@polanski.me>
pkgname=committed
pkgver=1.1.7
pkgrel=0
pkgdesc="Nitpicking your commit history"
url="https://github.com/crate-ci/committed"
license="MIT OR Apache-2.0"
arch="all"
makedepends="cargo libgit2-dev cargo-auditable"
source="https://github.com/crate-ci/committed/archive/v$pkgver/committed-$pkgver.tar.gz"
options="net" # fetch dependencies

export LIBGIT2_NO_VENDOR=1 # use system libgit2

prepare() {
	default_prepare

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

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

check() {
	cargo test --frozen -- \
		--skip in_repo
}

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

sha512sums="
39127a3508ac79b343363cca9b8113c044f473616665830d54eb35216c3a282cd72f84ba52dc1cf855c3fc0f9b2efb92950671d2162a34a94063ddd70df394d0  committed-1.1.7.tar.gz
"
