# $Id: PKGBUILD 117990 2014-08-28 00:35:46Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: coderoar <coderoar@gmail.com>
# Contributor: leemars <leemars@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=ibus-table
pkgver=1.8.9
pkgrel=1
pkgdesc='IM Engine framework for table-based input methods, such as ZhengMa, WuBi, ErBi, CangJie and so on'
arch=('any')
url="http://code.google.com/p/ibus/"
license=('LGPL')
makedepends=('git' 'docbook2x' 'docbook-sgml')
depends=('python-pyenchant' 'ibus' 'aspell-en')
source=("git+https://github.com/kaio/ibus-table.git#tag=$pkgver"
        sgml_fix.patch)
sha512sums=('SKIP'
            '930cd45e9687295159c44d5d4133e99a2259fb8f2ed51675b55b18ca59acb410144689a2d51b052b7bbcbe061f8135ebd511898658d1c71e7004303df969c880')

prepare() {
  cd ${pkgname}

  patch -p1 -i ../sgml_fix.patch
}

build() {
  cd $pkgname

  PYTHON=/usr/bin/python3 ./autogen.sh \
    --prefix=/usr \
    --libexecdir=/usr/lib/ibus

  make
}

package() {
  cd ${pkgname}

  make DESTDIR="${pkgdir}" install
}

