[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Sat Mar 14 12:58:44 UTC 2020


    Date: Saturday, March 14, 2020 @ 12:58:43
  Author: felixonmars
Revision: 596753

addpkg: rime-bopomofo 0.0.0.20190120-1

Added:
  rime-bopomofo/
  rime-bopomofo/repos/
  rime-bopomofo/trunk/
  rime-bopomofo/trunk/PKGBUILD

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Added: rime-bopomofo/trunk/PKGBUILD
===================================================================
--- rime-bopomofo/trunk/PKGBUILD	                        (rev 0)
+++ rime-bopomofo/trunk/PKGBUILD	2020-03-14 12:58:43 UTC (rev 596753)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=rime-bopomofo
+pkgver=0.0.0.20190120
+_commit=ed25098386f5efd3d70b08650f0d1b70c41c11a3
+pkgrel=1
+pkgdesc="Bopomofo input for rime"
+arch=('x86_64')
+url="https://github.com/rime/rime-bopomofo"
+license=('LGPL')
+# Rime will regenerate yaml&prism bin, which makes terra-pinyin required in runtime
+depends=('rime-terra-pinyin')
+makedepends=('librime' 'rime-prelude' 'rime-essay')
+source=("https://github.com/rime/rime-bopomofo/archive/$_commit/rime-bopomofo-$_commit.tar.gz")
+sha512sums=('6e0d0bcf891c3bad1927c55d9125eac266f195397986799740c0fe0f1e5e9a21ce4eb26935ce1f359374b7f6754274e11095332e9bab3d0b429bf06f98aabe28')
+
+prepare() {
+  cd $pkgname-$_commit
+  # Link essentials
+  for _f in $(pacman -Qql rime-prelude rime-essay rime-terra-pinyin | 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 build/terra_pinyin.*
+  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