summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcell Meszaros2022-04-11 19:59:46 +0200
committerMarcell Meszaros2022-04-11 19:59:46 +0200
commitf145f08d634a0775cc7cced6e58541540fa794f5 (patch)
treebe1a912c18dabb88beb0c3f430f01c711aec3cc8
parent017c2171f92aa42dd2ce7abf030a93b736d82ac5 (diff)
downloadaur-f145f08d634a0775cc7cced6e58541540fa794f5.tar.gz
fix versioning to align with Arch guidelines
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD12
2 files changed, 12 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d2464eb504cc..393a7ea395c6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = xdg-desktop-portal-git
pkgdesc = Desktop integration portals for sandboxed apps
- pkgver = 1.6.0+18+g552a4f3
+ pkgver = 1.14.1.r15.gdfd9539
pkgrel = 1
+ epoch = 1
url = https://github.com/flatpak/xdg-desktop-portal
arch = x86_64
license = LGPL2.1
diff --git a/PKGBUILD b/PKGBUILD
index 896462221e61..47b0e19fb6bb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,9 @@
pkgname=xdg-desktop-portal-git
_pkgname=xdg-desktop-portal
-pkgver=1.6.0+18+g552a4f3
+pkgver=1.14.1.r15.gdfd9539
pkgrel=1
+epoch=1
pkgdesc="Desktop integration portals for sandboxed apps"
url="https://github.com/flatpak/xdg-desktop-portal"
arch=(x86_64)
@@ -19,7 +20,14 @@ sha512sums=('SKIP')
pkgver() {
cd $_pkgname
- git describe --tags | sed 's/-/+/g'
+ # Generate git tag based version. Count only proper (v)#.#* [#=number] tags.
+ local _gitversion=$(git describe --long --tags --match '[v0-9][0-9.][0-9.]*' | sed -e 's|^v||' | tr '[:upper:]' '[:lower:]')
+
+ # Format git-based version for pkgver
+ echo "${_gitversion}" | sed \
+ -e 's|^\([0-9][0-9.]*\)-\([a-zA-Z]\+\)|\1\2|' \
+ -e 's|\([0-9]\+-g\)|r\1|' \
+ -e 's|-|.|g'
}
prepare() {