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

pkgname=apertium
pkgver=3.5.2
pkgrel=1
arch=('i686' 'x86_64' 'armv7h')
pkgdesc="Language-independent machine translation engine and tools to manage language data."
url="http://apertium.org"
license=('GPL2')
makedepends=('git' 'flex' 'pkgconf')
depends=('lttoolbox>=3.5' 'pcre' 'gawk' 'expat' 'libxslt')
options=('!libtool')
source=(https://github.com/apertium/$pkgname/releases/download/v$pkgver/apertium-$pkgver.tar.gz
        git+https://github.com/unhammer/apertium-get.git)
sha256sums=('90dcc9e7648989346d4bd22e8906ce1eb7027edca1f6d16e807f8a7e232a3d53'
            'SKIP')


prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  ln -s "$srcdir/apertium-get" apertium/apertium-get
}

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

  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}
