archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / rime-cantonese / repos / community-x86_64 / PKGBUILD
blobbb50d2ba0d24e48e58353501f0c516a5bdf1e8aa
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=rime-cantonese
4 pkgver=0.0.0.20230208
5 _commit=0948e0c9d3d1b39ec40c7dfbd17b5328ed29c858
6 pkgrel=1
7 pkgdesc="Cantonese input for rime"
8 arch=('x86_64')
9 url="https://github.com/rime/rime-cantonese"
10 license=('CCPL:cc-by')
11 # dependency for reverse lookup
12 depends=('rime-cangjie' 'rime-emoji' 'rime-loengfan' 'rime-luna-pinyin' 'rime-stroke')
13 makedepends=('git' 'librime' 'rime-prelude' 'rime-essay')
14 source=("git+https://github.com/rime/rime-cantonese.git#commit=$_commit")
15 sha512sums=('SKIP')
17 prepare() {
18   cd $pkgname
19   # Link essentials
20   for _f in $(pacman -Qql rime-prelude rime-essay | grep -v "/$"); do ln -sf $_f; done
23 build(){
24   cd $pkgname
25   for _s in $(ls *.schema.yaml); do rime_deployer --compile $_s; done
28 package() {
29   cd $pkgname
30   find . -type l -delete
31   rm build/*.txt
32   install -Dm644 *.txt *.yaml -t "$pkgdir"/usr/share/rime-data/
33   install -Dm644 build/* -t "$pkgdir"/usr/share/rime-data/build/
34   install -Dm644 opencc/* -t "$pkgdir"/usr/share/rime-data/opencc/