# Contributor: Kevin Brubeck Unhammer <unhammer@fsfe.org>
# Maintainer (aur): Kevin Brubeck Unhammer <unhammer@fsfe.org>

_commit=27d1ba848361684ba074e018d65b0282c4c84163

pkgname=apertium-eng-spa-git
pkgver=r0
pkgrel=1
arch=('i686' 'x86_64' 'armv7h')
pkgdesc="Apertium translation pair for English and Spanish"
url="https://github.com/apertium/apertium-eng-spa"
license=('GPL2')
makedepends=('git' 'apertium-lex-tools')
depends=('apertium>=3.5')
replaces=('apertium-en-es-git')
source=("git+https://github.com/apertium/apertium-eng-spa.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${pkgname%-git}"

  ./autogen.sh
  ./configure --prefix=/usr
  make
}

package() {
  cd "${pkgname%-git}"

  make DESTDIR="$pkgdir/" install
}
