summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonin Décimo2022-01-06 19:15:40 +0100
committerAntonin Décimo2022-01-06 19:22:25 +0100
commit8675730fc9d5fd37c980efb55e787dea8af33ddb (patch)
tree39ef6f019cd7376712481c348e0265b4965ca044
parent49c9a5fd8da2c651c2d66a63aaa4e5e291ff295f (diff)
downloadaur-8675730fc9d5fd37c980efb55e787dea8af33ddb.tar.gz
Extract version number using meson introspect
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD21
2 files changed, 14 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 76585c6374a9..634c20604266 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = wlroots-git
pkgdesc = Modular Wayland compositor library (git version)
- pkgver = 0.15.0.r9.g9988eb33
+ pkgver = 0.16.0.r34.96e630e
pkgrel = 1
url = https://gitlab.freedesktop.org/wlroots/wlroots
arch = x86_64
@@ -25,7 +25,7 @@ pkgbase = wlroots-git
depends = vulkan-validation-layers
depends = xorg-xwayland
provides = libwlroots.so
- provides = wlroots=0.15.0
+ provides = wlroots=0.16.0
conflicts = wlroots
options = debug
source = wlroots-git::git+https://gitlab.freedesktop.org/wlroots/wlroots.git
diff --git a/PKGBUILD b/PKGBUILD
index 9edacadb1468..31a4d60596c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
# Maintainer: Antonin Décimo <antonin dot decimo at gmail dot com>
pkgname=wlroots-git
-pkgver=0.15.0.r9.g9988eb33
+pkgver=0.16.0.r35.49c9a5f
pkgrel=1
license=(custom:MIT)
pkgdesc='Modular Wayland compositor library (git version)'
@@ -34,21 +34,24 @@ makedepends=(
source=("${pkgname}::git+${url}.git")
sha512sums=('SKIP')
+prepare () {
+ arch-meson \
+ --buildtype=debug \
+ -Dwerror=false \
+ -Dexamples=false \
+ "${pkgname}" build
+}
+
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)"
+ meson introspect --projectinfo build \
+ | awk 'match($0, /"version":\s*"([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)"/, ret) {printf "%s",ret[1]}'
+ printf ".r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build () {
- arch-meson \
- --buildtype=debug \
- -Dwerror=false \
- -Dexamples=false \
- "${pkgname}" build
meson compile -C build
}