# Contributor: Feng Shu <tumashu@163.com>

_realname=rime-terra-pinyin
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.0.0.20251009
_commit=11878613ea12c2199b3aa71e320491f468e1fc7d
pkgrel=1
pkgdesc="Terra pinyin for rime"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/rime/rime-terra-pinyin"
license=('LGPL')
# dependency for reverse lookup
depends=("${MINGW_PACKAGE_PREFIX}-rime-stroke")
source=("https://github.com/rime/rime-terra-pinyin/archive/${_commit}/rime-terra-pinyin-${_commit}.tar.gz")
sha512sums=('94e70485b7927b262ee1e032a1f0fc8c2b26a718e545a9aaddd28eb2e102f02d55c35293da6ae3b6fdf29044deb8e4b1bfb6f1dbd532cc079c4ff5a0590fbcef')

package() {
  cd "rime-terra-pinyin-${_commit}"
  install -Dm644 *.yaml -t "${pkgdir}${MINGW_PREFIX}/share/rime-data/"
}
