summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCritzlez2020-03-20 15:13:21 -0700
committerCritzlez2020-03-20 15:13:21 -0700
commita262d86acd133f713fb1ca11c88ea40456a988d0 (patch)
tree82b069a3c347b227f67e5a25474cc82ef1f9911d
parent03dbd123048d9b795a0b721d5d0e635f94b6012c (diff)
downloadaur-a262d86acd133f713fb1ca11c88ea40456a988d0.tar.gz
Add pkgver() function
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 148f11c322ad..50de1b2068b9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = detect-tablet-mode-git
pkgdesc = Detects both normal & tablet mode, executing custom scripts/commands for each mode. See the github page for instructions.
- pkgver = master
- pkgrel = 4
+ pkgver = r29.626e81c
+ pkgrel = 1
url = https://github.com/alesguzik/linux_detect_tablet_mode
install = detect-tablet-mode-git.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 851cd88c3392..88a6b1610ee9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: James Armstrong <jm.armstrong1207@gmail.com>
pkgname=detect-tablet-mode-git
-pkgver=master
-pkgrel=4
+pkgver=r29.626e81c
+pkgrel=1
pkgdesc="Detects both normal & tablet mode, executing custom scripts/commands for each mode. See the github page for instructions."
arch=("any")
url="https://github.com/alesguzik/linux_detect_tablet_mode"
@@ -21,6 +21,12 @@ source=("$pkgname::git+$url")
noextract=()
sha256sums=("SKIP")
+pkgver()
+{
+ cd $pkgname
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
package() {
cd $pkgname