# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=fcitx5-bamboo
pkgver=1.0.8
pkgrel=1
pkgdesc="Bamboo (Vietnamese Input Method) engine support for Fcitx"
arch=('x86_64')
url="https://github.com/fcitx/fcitx5-bamboo"
license=('GPL')
depends=('fcitx5')
makedepends=('git' 'extra-cmake-modules' 'go')
source=("git+https://github.com/fcitx/fcitx5-bamboo.git#tag=$pkgver?signed"
        "git+https://github.com/BambooEngine/bamboo-core.git")
sha512sums=('ddaecc189b094848f9949f0c648d4b5829e2d4c5f8759ff4d1a5f9c6d4122b0a8738c9d4b48a153b4758948c63360b61e38a7924ed2108deebce45decca9fce3'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

prepare() {
  cd fcitx5-bamboo
  git submodule init
  git config submodule.bamboo/bamboo-core.url "$srcdir"/bamboo-core
  git -c protocol.file.allow=always submodule update
}

build(){
  cd $pkgname
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  make
}

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