# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: ponsfoot <cabezon dot hashimoto at gmail dot com>

pkgname=libkkc-data
pkgver=0.2.7
pkgrel=4
_kkcver=0.3.5
pkgdesc="Language model data package for libkkc"
arch=('x86_64')
url="https://github.com/ueno/libkkc"
license=('GPL')
makedepends=('python-marisa')
source=(https://github.com/ueno/libkkc/releases/download/v$_kkcver/libkkc-data-$pkgver.tar.xz
        build-python3.patch::https://github.com/ueno/libkkc/commit/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch)

prepare() {
  cd "${pkgname}-${pkgver}"
  patch -Np4 -i ${srcdir}/build-python3.patch
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure PYTHON=/usr/bin/python --prefix=/usr
  make
}

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

sha512sums=('61c0cd8c0fa41ed8df49cac6709eebb245cc965d7e192b1ba945e95f2fc46aca8aa48c16e1977a12c157c55dab6b9f4c30f4905806725eca6e697b762eb7cbd7'
            'ba74aa8e545d32d40244f86009a49dedb575a6a8dd171baa5fc3e9a7aeac0ea51e4a7e2064a3f2b62f09bfa4751e3a33454a996b0acfe0fab45413dd84881755')
