[arch-commits] Commit in (4 files)

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


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

addpkg: rime-stroke 0.0.0.20191221-1

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

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

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