summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxeruf2021-09-16 16:28:31 +0200
committerxeruf2021-09-16 16:28:31 +0200
commit778b74195d1459ba249256d9e41fc7a31c61968e (patch)
tree05548e630956745c0c1df7c026b51158e46a5c1b
parent5e20fc2a5420b725dee37df1ed5a4b840256c1af (diff)
downloadaur-778b74195d1459ba249256d9e41fc7a31c61968e.tar.gz
Correct version format
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
2 files changed, 12 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7334de0bf4d..387fca9ab82 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = exfat-utils-debug-git
pkgdesc = Utilities for the exFAT file system with debugging enabled
- pkgver = v1.3.0.r28.gab19b44
+ pkgver = 1.3.0.r28.gab19b44
pkgrel = 1
url = https://github.com/relan/exfat
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 2fef0a28830..d25addd7778 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: xeruf <27f at pm dot me>
-pkgbasename=exfat
-pkgname=${pkgbasename}-utils-debug-git
-pkgver=v1.3.0.r28.gab19b44
+_pkgbasename=exfat
+pkgname=${_pkgbasename}-utils-debug-git
+pkgver=1.3.0.r28.gab19b44
pkgrel=1
pkgdesc='Utilities for the exFAT file system with debugging enabled'
arch=('i686' 'x86_64' 'mips64el' 'armv6h' 'armv7h' 'arm' 'aarch64')
@@ -15,24 +15,27 @@ source=('git+https://github.com/relan/exfat')
b2sums=('SKIP')
prepare() {
- cd ${pkgbasename}
+ cd ${_pkgbasename}
sed -i '/#define exfat_debug/D' fsck/main.c fuse/main.c
autoreconf -fiv
}
build() {
- cd ${pkgbasename}
+ cd ${_pkgbasename}
./configure --prefix=/usr --sbindir=/usr/bin
make CCFLAGS="${CFLAGS} ${CPPFLAGS} -std=c99" LINKFLAGS="${LDFLAGS}"
}
package() {
- cd ${pkgbasename}
+ cd ${_pkgbasename}
make DESTDIR="${pkgdir}" install
install -Dm644 */*.8 -t "${pkgdir}"/usr/share/man/man8
}
pkgver() {
- cd ${pkgbasename}
- git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd ${_pkgbasename}
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}