[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Sat Mar 14 12:48:15 UTC 2020


    Date: Saturday, March 14, 2020 @ 12:48:14
  Author: felixonmars
Revision: 596737

addpkg: rime-luna-pinyin 0.0.0.20200207-1

Added:
  rime-luna-pinyin/
  rime-luna-pinyin/repos/
  rime-luna-pinyin/trunk/
  rime-luna-pinyin/trunk/PKGBUILD

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

Added: rime-luna-pinyin/trunk/PKGBUILD
===================================================================
--- rime-luna-pinyin/trunk/PKGBUILD	                        (rev 0)
+++ rime-luna-pinyin/trunk/PKGBUILD	2020-03-14 12:48:14 UTC (rev 596737)
@@ -0,0 +1,39 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=rime-luna-pinyin
+pkgver=0.0.0.20200207
+_commit=ac5c02bd35e6d4d6eed1e1a03f7192919ae649bb
+pkgrel=1
+pkgdesc="Luna pinyin for rime"
+arch=('x86_64')
+url="https://github.com/rime/rime-luna-pinyin"
+license=('LGPL')
+makedepends=('librime' 'rime-prelude' 'rime-essay')
+source=("https://github.com/rime/rime-luna-pinyin/archive/$_commit/rime-luna-pinyin-$_commit.tar.gz")
+sha512sums=('fa85433d2b9cf31f9b98a71528e2cdc3e188cce27a6c14087db0ce77c78b8872d05ed9bf792a142e6e06a0cb293f4abe9bbd51b322071db9da22f77190a68ada')
+
+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