diff options
author | Antonin Décimo | 2022-01-06 19:15:40 +0100 |
---|---|---|
committer | Antonin Décimo | 2022-01-06 19:22:25 +0100 |
commit | 8675730fc9d5fd37c980efb55e787dea8af33ddb (patch) | |
tree | 39ef6f019cd7376712481c348e0265b4965ca044 | |
parent | 49c9a5fd8da2c651c2d66a63aaa4e5e291ff295f (diff) | |
download | aur-8675730fc9d5fd37c980efb55e787dea8af33ddb.tar.gz |
Extract version number using meson introspect
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 21 |
2 files changed, 14 insertions, 11 deletions
@@ -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 @@ -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 } |