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

_realname=rime-terra-pinyin
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.0.0.20251206
_commit=fa30016a9db2cf7d546ce33968c311525f0d90a0
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=('67a57fcbdbb4a6f314cee30116c4f6afe51317d52134a4f76c7da7462fbcafbc6608d8d61431a9408605c4623f6b9009a03b703bd6186bce791eb909002dbdbf')

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