diff options
author | Marcell Meszaros | 2022-04-11 19:59:46 +0200 |
---|---|---|
committer | Marcell Meszaros | 2022-04-11 19:59:46 +0200 |
commit | f145f08d634a0775cc7cced6e58541540fa794f5 (patch) | |
tree | be1a912c18dabb88beb0c3f430f01c711aec3cc8 | |
parent | 017c2171f92aa42dd2ce7abf030a93b736d82ac5 (diff) | |
download | aur-f145f08d634a0775cc7cced6e58541540fa794f5.tar.gz |
fix versioning to align with Arch guidelines
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 12 |
2 files changed, 12 insertions, 3 deletions
@@ -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 @@ -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() { |