[arch-commits] Commit in (4 files)
Felix Yan
felixonmars at archlinux.org
Sat Mar 14 17:34:13 UTC 2020
Date: Saturday, March 14, 2020 @ 17:34:13
Author: felixonmars
Revision: 597032
addpkg: rime-wubi 0.0.0.20190120-1
Added:
rime-wubi/
rime-wubi/repos/
rime-wubi/trunk/
rime-wubi/trunk/PKGBUILD
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Added: rime-wubi/trunk/PKGBUILD
===================================================================
--- rime-wubi/trunk/PKGBUILD (rev 0)
+++ rime-wubi/trunk/PKGBUILD 2020-03-14 17:34:13 UTC (rev 597032)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=rime-wubi
+pkgver=0.0.0.20190120
+_commit=dd052ee158a38cb791755318b1aef9b4a3ed0316
+pkgrel=1
+pkgdesc="Wubi input for rime"
+arch=('x86_64')
+url="https://github.com/rime/rime-wubi"
+license=('LGPL')
+# dependency for reverse lookup
+depends=('rime-pinyin-simp')
+makedepends=('librime' 'rime-prelude' 'rime-essay')
+source=("https://github.com/rime/rime-wubi/archive/$_commit/rime-wubi-$_commit.tar.gz")
+sha512sums=('7da0b3ba0fdce2b0f71a07d8f8b6b31986ebd6ebd86ab1fdaeadc0693a39fa7a00b950477e42c51164dcde02617debef3d7db0be97482d7d9402e614dafc1302')
+
+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