[arch-commits] Commit in (4 files)
Felix Yan
felixonmars at archlinux.org
Sat Mar 14 17:50:16 UTC 2020
Date: Saturday, March 14, 2020 @ 17:50:15
Author: felixonmars
Revision: 597048
addpkg: rime-cantonese 0.0.0.20200309-1
Added:
rime-cantonese/
rime-cantonese/repos/
rime-cantonese/trunk/
rime-cantonese/trunk/PKGBUILD
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Added: rime-cantonese/trunk/PKGBUILD
===================================================================
--- rime-cantonese/trunk/PKGBUILD (rev 0)
+++ rime-cantonese/trunk/PKGBUILD 2020-03-14 17:50:15 UTC (rev 597048)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=rime-cantonese
+pkgver=0.0.0.20200309
+_commit=b1f17c5dc7c50dd9b86f39505e8927a697b4647d
+pkgrel=1
+pkgdesc="Cantonese input for rime"
+arch=('x86_64')
+url="https://github.com/rime/rime-cantonese"
+license=('LGPL')
+# dependency for reverse lookup
+depends=('rime-cangjie' 'rime-luna-pinyin' 'rime-stroke')
+makedepends=('librime' 'rime-prelude' 'rime-essay')
+source=("https://github.com/rime/rime-cantonese/archive/$_commit/rime-cantonese-$_commit.tar.gz")
+sha512sums=('7141f0c1d44b487b0528603e37448a3d4f9886f7137b2b9badef0714278b0165d6c2f15df11b99620267078e71b0390d32393207d31492de3c42d743d1a477ff')
+
+prepare() {
+ cd $pkgname-$_commit
+ # Link essentials
+ for _f in $(pacman -Qql rime-prelude rime-essay | grep -v "/$"); do ln -sf $_f; done
+
+ # Build binaries only for this package
+ rm default.yaml
+ cp /usr/share/rime-data/default.yaml ./
+ sed -i -e '/- schema:/d' -e '/schema_list:/d' default.yaml
+ echo "schema_list:" >> default.yaml
+ ls *.schema.yaml | cut -d "." -f 1 | sed -e 's/\(.*\)/ - schema: \1/' >> default.yaml
+}
+
+build(){
+ cd $pkgname-$_commit
+ rime_deployer --build .
+}
+
+package() {
+ cd $pkgname-$_commit
+ find . -type l -delete
+ rm {,build/}default.yaml user.yaml
+ install -Dm644 *.yaml -t "$pkgdir"/usr/share/rime-data/
+ install -Dm644 build/* -t "$pkgdir"/usr/share/rime-data/build/
+}
More information about the arch-commits
mailing list