# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=byacc
pkgver=20170709
pkgrel=0
pkgdesc="The Berkeley Yacc general-purpose parser generator"
url="http://invisible-island.net/byacc/byacc.html"
arch="all"
license="Public-Domain"
depends="!bison"
subpackages="$pkgname-doc"
source="https://invisible-mirror.net/archives/byacc/byacc-$pkgver.tgz"

builddir="$srcdir/$pkgname-$pkgver"
build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="81b6e2dfe674d7e7650e1583c46f67e20cc5ff56b06ef73a54ec2070abd7f4af1a0db7909f31264d0e6157acd3661c19c3478e06c9bab395f53d0371bc1e9097  byacc-20170709.tgz"
