# Maintainer: Zach DeCook <zachdecook@librem.one>
pkgname=swipeguess
pkgver=0.3.1
pkgrel=0
pkgdesc="Utility to turn swipes into words"
url="https://git.sr.ht/~earboxer/swipeGuess"
license="AGPL-3.0-only"
arch="all"
makedepends="scdoc words-en"
subpackages="$pkgname-doc $pkgname-completelytypeword $pkgname-mapscore $pkgname-words-qwerty-en:wordsqwertyen"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~earboxer/swipeGuess/archive/v$pkgver.tar.gz"
builddir="$srcdir/swipeGuess-v$pkgver"

build() {
	make PREFIX="/usr" all
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" PREFIX="/usr" install
}

completelytypeword() {
	depends="wtype"
	mkdir -p "$subpkgdir"/usr/bin/
	mv "$builddir"/completelyTypeWord.sh "$subpkgdir"/usr/bin/
}

mapscore() {
	amove usr/bin/mapScore
}

wordsqwertyen() {
	amove usr/share/swipeGuess/words/words-qwerty-en
}

sha512sums="
103a7aa0be379c9d32c35827b8a18a466be36a094af79bb06015f1d75c0e00b691ed0799e4ac51fb61e612e700e53515e542170bbf43006fe152943d5349c186  swipeguess-0.3.1.tar.gz
"
