# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>

pkgname=bison
pkgver=3.0.5
pkgrel=1
pkgdesc="The GNU general-purpose parser generator"
arch=('x86_64' 'ppc64le')
license=('GPL3')
url="http://www.gnu.org/software/bison/bison.html"
depends=('glibc' 'm4' 'sh')
groups=('base-devel')
source=("ftp://ftp.gnu.org/gnu/bison/${pkgname}-${pkgver}.tar.xz"{,.sig})
md5sums=('3e54f20988ecd1b62044e25481e5f06b'
         'SKIP')
validpgpkeys=('7DF84374B1EE1F9764BBE25D0DDCAA3278D5264E')  # Akim Demaille

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr --datadir=/usr/share
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
