# Contributor: Bryce Vandegrift <bryce@brycevandegrift.xyz>
# Maintainer: Bryce Vandegrift <bryce@brycevandegrift.xyz>
pkgname=minipeg
pkgver=0.1.18_git20221008
_commit=e6e26c2612cae839cee1323395bc62f2e11377d1
pkgrel=0
pkgdesc="Minimal fork of peg/leg C parser generator"
url="https://ach.srht.site/minipeg"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
source="$pkgname-$_commit.tar.gz::https://github.com/andrewchambers/minipeg/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

build() {
	make
}

check() {
	make check
}

package() {
	install -Dm 0755 "$pkgname" -t "$pkgdir"/usr/bin
	install -Dm 0644 "$pkgname".1 -t "$pkgdir"/usr/share/man/man1
	install -Dm 0644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
6adea0dc0f236c05a20b0bbe9fe118dc7938274c0b32a5e1565ac21f27e9e99a264cd1dd1754e9885dac603dcfb5bb3483a4d504835ba9493e52bac9ba903d05  minipeg-e6e26c2612cae839cee1323395bc62f2e11377d1.tar.gz
"
