summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 12 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 01db07f9c44..e5febda9630 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,9 +22,18 @@ source=("git+http://repo.or.cz/${gitname}.git")
sha512sums=('SKIP')
pkgver() {
- cd "${srcdir}/${gitname}"
- local ver="$(cat VERSION).$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
- printf "%s" "${ver//-/.}"
+ cd "${srcdir}/${gitname}"
+
+ # we recently went
+ # from 2.21.204.5117359
+ # to 2.21.1.209.a9d7a00
+ # which rightfully confused pacman's version ordering
+ # so let's add a .0 to versions with only one dot
+ local v=$(cat VERSION)
+ [[ "$v" =~ ^[^\.]+\.[^\.]+\..*$ ]] || v=$v.0
+
+ local ver="${v}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ printf "%s" "${ver//-/.}"
}
build() {
cd "${srcdir}/${gitname}"