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