summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLenovsky2018-03-26 01:22:35 +0200
committerLenovsky2018-03-26 01:22:35 +0200
commit26e06d60d319d4db57c389cc095ae3f2c7458cb3 (patch)
treef855d28744af36be3262d870299c0b2afdd68de8 /PKGBUILD
parent02e19b9627d127d52572fc2966626825c1c616d8 (diff)
downloadaur-26e06d60d319d4db57c389cc095ae3f2c7458cb3.tar.gz
Rework pkgver() function
The version output was inaccurate, after rework: - release part match actual one, - revision part count from the last release, instead of beginning of the history.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 3 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a6845b3f6052..548a2a3db5e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@
pkgbase=kodi-git
pkgname=('kodi-git' 'kodi-eventclients-git' 'kodi-tools-texturepacker-git' 'kodi-dev-git')
_gitname='xbmc'
-pkgver=18.0.r48667.03d453ae65
+pkgver=18.0a1.r199.g03d453ae65
pkgrel=1
arch=('i686' 'x86_64')
url="http://kodi.tv"
@@ -31,12 +31,10 @@ makedepends=('afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'g
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'upower')
source=("$_gitname::git+https://github.com/xbmc/xbmc.git#branch=master")
sha256sums=('SKIP')
+
pkgver() {
cd "$srcdir/$_gitname"
- _major=$(grep 'VERSION_MAJOR' version.txt | sed 's/VERSION_MAJOR //')
- _minor=$(grep 'VERSION_MINOR' version.txt | sed 's/VERSION_MINOR //')
- _revision=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
- echo "$_major.$_minor.$_revision"
+ git describe --long --tags | sed 's/\([^-]*-\)/r/2;s/-/./g'
}
prepare() {