summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoriveahugeship2021-07-04 02:27:02 +0300
committeriveahugeship2021-07-04 02:27:02 +0300
commitd5ba303550088d0bba51209e068288c7d6e3ac64 (patch)
tree0f4b933752fb6d2ea683688bfb4520d37751ac95
parentc7fd2717ffc9675b441a5afad74c8bbef06284ef (diff)
downloadaur-d5ba303550088d0bba51209e068288c7d6e3ac64.tar.gz
feat: update 'pkgver'
This changes 'pkgver' with VCS package guidelines. See: https://wiki.archlinux.org/title/VCS_package_guidelines#The_pkgver()_function
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
2 files changed, 12 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 34853b741d4d..9fcfcf8efe58 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gpu-burn-git
pkgdesc = Multi-GPU CUDA stress test
- pkgver = 1e9a84f4bec3b0835c00daace45d79ed6c488edb
+ pkgver = r50.1e9a84f
pkgrel = 1
url = https://github.com/wilicc/gpu-burn
arch = x86_64
@@ -13,7 +13,7 @@ pkgbase = gpu-burn-git
conflicts = gpu_burn-git
conflicts = gpu-burn
replaces = gpu_burn-git
- source = gpu-burn-git::git+https://github.com/wilicc/gpu-burn?ref=1e9a84f4bec3b0835c00daace45d79ed6c488edb
+ source = gpu-burn-git::git+https://github.com/wilicc/gpu-burn.git
sha256sums = SKIP
pkgname = gpu-burn-git
diff --git a/PKGBUILD b/PKGBUILD
index f55ac1837fb4..e0c664fed0f7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: sparklespdx <josh.farwell@gmail.com>
pkgname="gpu-burn-git"
-pkgver="1e9a84f4bec3b0835c00daace45d79ed6c488edb"
+pkgver="r50.1e9a84f"
pkgrel=1
pkgdesc="Multi-GPU CUDA stress test"
arch=("x86_64")
@@ -13,9 +13,17 @@ depends=("nvidia" "opencl-nvidia" "cuda")
provides=("gpu-burn")
conflicts=("gpu_burn-git" "gpu-burn")
replaces=("gpu_burn-git")
-source=("${pkgname}::git+https://github.com/wilicc/gpu-burn?ref=${pkgver}")
+source=("${pkgname}::git+https://github.com/wilicc/gpu-burn.git")
sha256sums=("SKIP")
+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 () {
sed -i "s|CUDAPATH ?= /usr/local/cuda|CUDAPATH ?= /opt/cuda|g" "${pkgname}"/Makefile