summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTriss Healy2021-11-04 16:51:23 +1100
committerTriss Healy2021-11-04 16:51:23 +1100
commitaeab5e347d2be4d349f0f9063a655a97e8406f69 (patch)
tree6bbed1921984e18d45251538718fdce764d3b054
parentd06742b234a7208d369cb916ca657a5a427a8c8f (diff)
downloadaur-aeab5e347d2be4d349f0f9063a655a97e8406f69.tar.gz
Changed version to be inline with the VCS package guidelines
-rw-r--r--PKGBUILD13
1 files changed, 8 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3324fe64ecb4..c996dd04f3b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {