summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFreggar2018-05-18 20:34:50 +0200
committerFreggar2018-05-18 20:34:50 +0200
commitf7cf1c318752fc71adac9ac4f1eedbd77d3142cf (patch)
tree60561c02bd45decc2e0ad549cc8626aa2214b3be /PKGBUILD
parent49f089593fea298eac0e331bd83f1f48cb692604 (diff)
downloadaur-f7cf1c318752fc71adac9ac4f1eedbd77d3142cf.tar.gz
Add pkgver and use pkgname variable
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD13
1 files changed, 9 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4253c89b636..75bc3d7c372 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
}