diff options
author | Triss Healy | 2021-11-04 16:51:23 +1100 |
---|---|---|
committer | Triss Healy | 2021-11-04 16:51:23 +1100 |
commit | aeab5e347d2be4d349f0f9063a655a97e8406f69 (patch) | |
tree | 6bbed1921984e18d45251538718fdce764d3b054 | |
parent | d06742b234a7208d369cb916ca657a5a427a8c8f (diff) | |
download | aur-aeab5e347d2be4d349f0f9063a655a97e8406f69.tar.gz |
Changed version to be inline with the VCS package guidelines
-rw-r--r-- | PKGBUILD | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,7 +1,6 @@ # Maintainer: Triss Healy (trissylegs) <th at trissyle dot gs> pkgname=libshumate-git -pkgver=0.0 pkgrel=1 pkgdesc="GTK4 widget to display maps (git version)" arch=(x86_64) @@ -9,14 +8,18 @@ url="https://wiki.gnome.org/Projects/libshumate" license=(LGPL) depends=(gtk4 libsoup sqlite) makedepends=(git gobject-introspection gtk-doc gi-docgen meson vala) -provides=("libshumate" "libshumate-${pkgver}.so") +provides=("libshumate") source=("git+https://gitlab.gnome.org/GNOME/${pkgname/-git/}.git") sha256sums=('SKIP') -pkgver() { - # Read version number from meson file. - grep -oP "(?<=version: ')\d+\.\d+" ${pkgname/-git/}/meson.build +# Use version once repo has been tagged. But use revision numbers for now. +pkgver() { + cd "$pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) } prepare() { |