maintainer="Stefan Hansson <newbyte@postmarketos.org>"
pkgname=dint
pkgver=0.2.0
pkgrel=0
pkgdesc="postmarketOS deviceinfo validator, linter, and documentation generator"
url="https://gitlab.postmarketos.org/postmarketOS/dint"
arch="all"
license="EUPL-1.2"
makedepends="cargo cargo-auditable"
source="https://gitlab.postmarketos.org/postmarketOS/dint/-/archive/$pkgver/dint-$pkgver.tar.bz2"
options="!pmb:crossdirect"

prepare() {
	default_prepare

	cargo fetch --locked
}

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

check() {
	cargo test --frozen
}

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

sha512sums="
2b02f0137431e18f97e7cd0ebe4fb0b05e324a7da6738addb1da8a29c688edb1116f2376ff121b8f5b4493f5071b104bccf3c6487a4f9ca6eff194112e7592b0  dint-0.2.0.tar.bz2
"
