From 474478c3a7b82e8e4b88fa077f515864c931df4a Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Wed, 17 Jun 2020 01:12:47 +0200 Subject: [PATCH] add: pkgver() function --- core-testing/PKGBUILD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-testing/PKGBUILD b/core-testing/PKGBUILD index 7bbcea7..7be0ee4 100644 --- a/core-testing/PKGBUILD +++ b/core-testing/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Tobias Reisinger pkgname=emgauwa-core-testing -pkgver=0.0.1 +pkgver=0.1.0 pkgrel=1 epoch= pkgdesc="" @@ -23,6 +23,10 @@ sha256sums=("SKIP" "b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798" "0531f10303410afd7e53099e66b124ef2fd14afec9d33c4a0146793375acb6c2") +pkgver() { + grep -Po "^ *VERSION \K[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$" "${pkgname}/CMakeLists.txt" +} + prepare() { cd "$pkgname" mkdir -p "build"