[arch-commits] Commit in (4 files)
Felix Yan
felixonmars at archlinux.org
Sat Mar 14 12:53:44 UTC 2020
Date: Saturday, March 14, 2020 @ 12:53:44
Author: felixonmars
Revision: 596749
addpkg: rime-terra-pinyin 0.0.0.20200207-1
Added:
rime-terra-pinyin/
rime-terra-pinyin/repos/
rime-terra-pinyin/trunk/
rime-terra-pinyin/trunk/PKGBUILD
----------+
PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Added: rime-terra-pinyin/trunk/PKGBUILD
===================================================================
--- rime-terra-pinyin/trunk/PKGBUILD (rev 0)
+++ rime-terra-pinyin/trunk/PKGBUILD 2020-03-14 12:53:44 UTC (rev 596749)
@@ -0,0 +1,39 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=rime-terra-pinyin
+pkgver=0.0.0.20200207
+_commit=492aaf914f9de37cc9d26b846dc693116de70ae8
+pkgrel=1
+pkgdesc="Terra pinyin for rime"
+arch=('x86_64')
+url="https://github.com/rime/rime-terra-pinyin"
+license=('LGPL')
+makedepends=('librime' 'rime-prelude' 'rime-essay')
+source=("https://github.com/rime/rime-terra-pinyin/archive/$_commit/rime-terra-pinyin-$_commit.tar.gz")
+sha512sums=('d15b5a6de6b20c4f50392703c21dded69a985bf25f3d93ee213facfd59e1d5b30d32f0296c6a97ac1edbb5056877591fc1d7637f27f7d273bb7f69636c2b1353')
+
+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