upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / rime-bopomofo / trunk / PKGBUILD
bloba6c2e5ae63a33ba4db6af16ad4b7976da1b78c0c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=rime-bopomofo
4 pkgver=0.0.0.20210131
5 _commit=c7618f4f5728e1634417e9d02ea50d82b71956ab
6 pkgrel=1
7 pkgdesc="Bopomofo input for rime"
8 arch=('x86_64')
9 url="https://github.com/rime/rime-bopomofo"
10 license=('LGPL')
11 # Rime will regenerate yaml&prism bin, which makes terra-pinyin required on runtime (for translator)
12 # rime-cangjie is dependency for reverse lookup
13 depends=('rime-cangjie' 'rime-terra-pinyin')
14 makedepends=('librime' 'rime-prelude' 'rime-essay')
15 source=("https://github.com/rime/rime-bopomofo/archive/$_commit/rime-bopomofo-$_commit.tar.gz")
16 sha512sums=('106a2897ac409b12e5a9aee35bed31e6bd76e4c2cb5caed5d201e03891b316fe42e279c72e5a3b06fe575ea2e897903986fcab9401933b7dfc4d47064be01bce')
18 prepare() {
19   cd $pkgname-$_commit
20   # Link essentials
21   for _f in $(pacman -Qql rime-prelude rime-essay rime-terra-pinyin | grep -v "/$"); do ln -sf $_f; done
24 build(){
25   cd $pkgname-$_commit
26   for _s in $(ls *.schema.yaml); do rime_deployer --compile $_s; done
29 package() {
30   cd $pkgname-$_commit
31   find . -type l -delete
32   rm build/terra_pinyin.*
33   rm build/*.txt
34   install -Dm644 *.yaml -t "$pkgdir"/usr/share/rime-data/
35   install -Dm644 build/* -t "$pkgdir"/usr/share/rime-data/build/