From cad0c6af1b61a5e2d5d9aeb3474b8b31bb630dc0 Mon Sep 17 00:00:00 2001 From: FireZ Date: Fri, 4 Dec 2015 20:18:48 +0800 Subject: [PATCH] fix pkgver --- .SRCINFO | 2 +- PKGBUILD | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 3f0d5cb..281a95e 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = vim-arduino-syntax-git pkgdesc = Arduino syntax files for Vim - pkgver = 83f766d + pkgver = r17.83f766d pkgrel = 1 url = https://github.com/sudar/vim-arduino-syntax arch = any diff --git a/PKGBUILD b/PKGBUILD index ff7b1f6..325eab8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=vim-arduino-syntax-git _pkgname=vim-arduino-syntax -pkgver=83f766d +pkgver=r17.83f766d pkgrel=1 url=https://github.com/sudar/vim-arduino-syntax pkgdesc="Arduino syntax files for Vim" @@ -11,6 +11,11 @@ depends=(vim) source=("git://github.com/sudar/vim-arduino-syntax.git") md5sums=(SKIP) +pkgver() { + cd "${srcdir}/${_pkgname}" + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + package() { cd "${srcdir}/${_pkgname}" for dir in ftdetect indent syntax