# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=ttyper
pkgver=1.5.0
pkgrel=0
pkgdesc="Terminal-based typing test"
url="https://github.com/max-niederman/ttyper/"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/max-niederman/ttyper/archive/refs/tags/v$pkgver/ttyper-$pkgver.tar.gz
	cargo-update.patch
	"

prepare() {
	default_prepare

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

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

check() {
	cargo test --frozen
}

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

sha512sums="
ee21ec8a5d6c9b0d066d881de8f1170ad7a57a12329b66da51283f68a24002309d846e7206170e7d85cce3078c12bc425b656dae7f0043b8141e16e3b4c96931  ttyper-1.5.0.tar.gz
8393f46e6c9064e7669f2ad53a22381d2db92410da8cd1cff9f6055eeb0a9306facc88661b88c3b434e128828683073204fca827ae86e2296a5257234c6e0c5c  cargo-update.patch
"
