# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=ibus-typing-booster
pkgver=2.5.3
pkgrel=1
pkgdesc="Predictive input method for the IBus platform"
url="https://mike-fabian.github.io/ibus-typing-booster/"
arch=(any)
license=(GPL3 Apache)
depends=(ibus python-gobject python-dbus python-pyenchant m17n-lib sqlite)
makedepends=(git)
_commit=00b015e7ac5310fa7d3961033421277ffd51ce3e  # tags/2.5.3
source=("git+https://github.com/mike-fabian/ibus-typing-booster#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --libexec=/usr/lib/ibus
  make
}

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

  cd "$pkgdir/usr/share/$pkgname/data"
  gzip -nf --best *.{txt,json} annotations{,Derived}/*.xml
}
