diff options
author | iveahugeship | 2021-07-04 02:27:02 +0300 |
---|---|---|
committer | iveahugeship | 2021-07-04 02:27:02 +0300 |
commit | d5ba303550088d0bba51209e068288c7d6e3ac64 (patch) | |
tree | 0f4b933752fb6d2ea683688bfb4520d37751ac95 | |
parent | c7fd2717ffc9675b441a5afad74c8bbef06284ef (diff) | |
download | aur-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-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 12 |
2 files changed, 12 insertions, 4 deletions
@@ -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 @@ -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 |