summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFreggar2018-05-18 20:34:50 +0200
committerFreggar2018-05-18 20:34:50 +0200
commitf7cf1c318752fc71adac9ac4f1eedbd77d3142cf (patch)
tree60561c02bd45decc2e0ad549cc8626aa2214b3be
parent49f089593fea298eac0e331bd83f1f48cb692604 (diff)
downloadaur-f7cf1c318752fc71adac9ac4f1eedbd77d3142cf.tar.gz
Add pkgver and use pkgname variable
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
2 files changed, 11 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 174444fd3ea5..16d8c9dc4584 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = piper-git
pkgdesc = Piper is a GUI interface to ratbagd, the system daemon for configurable mice
- pkgver = 0.2.900
+ pkgver = 0.2.900.r30.g5f6ed20
pkgrel = 1
url = https://github.com/libratbag/piper
arch = i686
@@ -16,7 +16,7 @@ pkgbase = piper-git
provides = piper
conflicts = piper
options = !emptydirs
- source = git+https://github.com/libratbag/piper.git
+ source = piper-git::git+https://github.com/libratbag/piper.git
sha256sums = SKIP
pkgname = piper-git
diff --git a/PKGBUILD b/PKGBUILD
index 4253c89b636a..75bc3d7c372b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Original Carlos Silva <r3pek@r3pek.org>
pkgname=piper-git
-pkgver=0.2.900
+pkgver=0.2.900.r30.g5f6ed20
pkgrel=1
pkgdesc='Piper is a GUI interface to ratbagd, the system daemon for configurable mice'
arch=('i686' 'x86_64')
@@ -11,19 +11,24 @@ license=('GPL')
depends=('python3' 'python-gobject>=3.0' 'libratbag' 'python-evdev' 'python-lxml' 'python-cairo')
makedepends=('meson')
options=(!emptydirs)
-source=("git+https://github.com/libratbag/piper.git")
+source=("${pkgname}::git+https://github.com/libratbag/piper.git")
sha256sums=('SKIP')
conflicts=('piper')
provides=('piper')
+pkgver() {
+ cd "$pkgname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
build() {
- cd piper
+ cd "${srcdir}/${pkgname}"
meson builddir --prefix=/usr/
ninja -C builddir
}
package() {
- cd piper
+ cd "${srcdir}/${pkgname}"
DESTDIR="${pkgdir}" ninja -C builddir install
}