summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Arndt2020-10-06 15:29:26 +0200
committerChristopher Arndt2020-10-06 15:29:26 +0200
commit4ebef8f0370d2cce2fd5b403eeb497c68be47089 (patch)
treec4794b560afe64580b85b85ac323980151f6a6c6
parent5639f34e7b1f6cc0e43743e58a0405b3bfe09b9d (diff)
downloadaur-4ebef8f0370d2cce2fd5b403eeb497c68be47089.tar.gz
PKGBUILD improvements & fixes
* Improve pkgver function * Fix i18n files installation path Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD15
2 files changed, 10 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 37f405bca7e..bf71a2afb8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = hydrogen-git
pkgdesc = An advanced drum machine (git version)
- pkgver = 1.0.0.r3715.7cdf94d3
+ pkgver = 1.0.0.r90.g051e723e
pkgrel = 1
url = https://github.com/hydrogen-music/hydrogen
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index c4f2706360f..5b3442d6dc5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=hydrogen
pkgname="${_pkgname}-git"
-pkgver=1.0.0.r3715.7cdf94d3
+pkgver=1.0.0.r90.g051e723e
pkgrel=1
pkgdesc="An advanced drum machine (git version)"
arch=('x86_64')
@@ -28,10 +28,10 @@ md5sums=('SKIP'
pkgver() {
cd "${srcdir}/${_pkgname}"
- local version="$(git describe --tags | sed -e 's/-[^-]*-[^-]*$//;s/-/./g')"
- local revision=$(git rev-list --count HEAD)
- local hash=$(git rev-parse --short HEAD)
- echo $version.r$revision.$hash
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
prepare() {
@@ -49,7 +49,10 @@ prepare() {
git submodule update
# update docbook dtd version
- patch -Np1 -i "${srcdir}/fix_dtd_version.patch" || true
+ patch -Np1 -r - -i "${srcdir}/fix_dtd_version.patch" || true
+
+ # fix *.qm file installation path
+ sed -i 's|\./data/i18n|${H2_DATA_PATH}/data/i18n|' data/i18n/CMakeLists.txt
}
build() {