summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD11
2 files changed, 12 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3306a11c9dd9..021b55ab29d5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = rime-data
pkgdesc = Rime schema repository from plum
- pkgver = 2019.12.18
+ pkgver = r111.397d601
pkgrel = 1
+ epoch = 1
url = https://github.com/rime/plum/
arch = x86_64
license = GPL3
diff --git a/PKGBUILD b/PKGBUILD
index 5a7574957608..3f50ba3c82ec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,9 @@
pkgname=rime-data
_gitname=plum
-pkgver=2019.12.18
+pkgver=r111.397d601
pkgrel=1
+epoch=1
pkgdesc="Rime schema repository from plum"
arch=('x86_64')
url="https://github.com/rime/plum/"
@@ -16,6 +17,14 @@ conflicts=('brise')
source=("git+https://github.com/rime/plum.git")
sha512sums=('SKIP')
+pkgver() {
+ cd "$_gitname"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
build() {
cd "$_gitname"
make all