diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -3,8 +3,8 @@ pkgname="php-cairo-git" _pkgname=${pkgname%-git} __pkgname=${_pkgname#php-} -pkgver=r205.9662114 -pkgrel=2 +pkgver=1.0.0_dev.r9.9662114 +pkgrel=1 pkgdesc="PHP Object Oriented interface to Cairo Graphics library." arch=('any') url="https://github.com/gtkforphp/$__pkgname" @@ -20,8 +20,10 @@ pkgver() { cd "$_pkgname" ( set -o pipefail - git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/^v//' || - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + release="$(grep VERSION src/php_cairo.h | cut -f2 -d\" | tr - _)" + hash="$(git blame src/php_cairo.h | grep VERSION | cut -f1 -d\ )" + revision="$(git rev-list --count $hash..HEAD).$(git rev-parse --short HEAD)" + printf "%s.r%s" "$release" "$revision" ) } |