summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Fernyhough2018-08-14 17:13:52 +0100
committerJonathon Fernyhough2018-08-14 17:13:52 +0100
commit27845a2b7e00a8d80e19964d129cec91c1052ee1 (patch)
tree3f2b261c5a6c7cefc6745710e3e85077a211d731
parentc0d563b9ed2224e9c32c16fabacc22e18380d43b (diff)
downloadaur-27845a2b7e00a8d80e19964d129cec91c1052ee1.tar.gz
Add missing pkgver() function
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
2 files changed, 9 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1deab408624..9e460536543 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gtkhtml4-git
pkgdesc = A lightweight HTML renderer/editor widget for GTK3
pkgver = latest
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/GNOME/gtkhtml
arch = i686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index fe3e83caa3c..56eff37d8dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,8 @@
# Previous Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=gtkhtml4-git
-_pkgbasename=gtkhtml
pkgver=latest
-pkgrel=2
+pkgrel=3
pkgdesc="A lightweight HTML renderer/editor widget for GTK3"
arch=(i686 x86_64)
license=('GPL')
@@ -19,11 +18,17 @@ depends=('cairo>=1.10.0'
'iso-codes>=0.49')
makedepends=('intltool')
url='https://github.com/GNOME/gtkhtml'
-source=("${pkgname/-git/}::git+https://github.com/GNOME/${_pkgbasename}.git"
+source=("${pkgname/-git/}::git+https://github.com/GNOME/${pkgname/4-git/}.git"
'enchant-2.patch')
sha256sums=('SKIP'
'2b78f071f7893e19618959443f3775bd435941a37ea9198b2fe72b596c205891')
+pkgver() {
+ cd "${pkgname/-git/}"
+ # https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
+ git describe --long 2>/dev/null | sed 's/GTKHTML_//; s/\([^-]*-g\)/r\1/; s/[-_]/./g'
+}
+
prepare() {
cd "${pkgname/-git/}"
patch -Np0 < ../enchant-2.patch