summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lublin2019-10-31 14:59:54 +0100
committerDaniel Lublin2019-10-31 15:00:46 +0100
commit737cc3bd44c25a2a862b172834c244dd9057c68c (patch)
treeca371834a51163a196452c30781ade65a82e3488
parent6bd49d2ad08567789aa7c68243c95d8b3dba342b (diff)
downloadaur-737cc3bd44c25a2a862b172834c244dd9057c68c.tar.gz
Revise according to Makefile
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
2 files changed, 6 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3a88ae8514f7..667aba9a31f4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ntsclient-git
pkgdesc = Small Network Time Security Client (NTP with NTS). Alpha software.
- pkgver = r27.671e778
+ pkgver = 0.1.1.r1.g4b484cd
pkgrel = 1
url = https://gitlab.com/hacklunch/ntsclient
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 84e29be22694..e0f6326ac09d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=ntsclient
pkgname=$_pkgname-git
-pkgver=r27.671e778
+pkgver=0.1.1.r1.g4b484cd
pkgrel=1
pkgdesc='Small Network Time Security Client (NTP with NTS). Alpha software.'
arch=('i686' 'x86_64')
@@ -16,15 +16,17 @@ sha256sums=('SKIP')
pkgver() {
cd $_pkgname
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd $_pkgname
+ GITVERSION="$(git describe --tags --long --dirty)"
+ BUILDTIMESTAMP="$(date +%s)"
go build \
-gcflags "all=-trimpath=$PWD" \
-asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
+ -ldflags "-X main.gitVersion=$GITVERSION -X main.buildTimestamp=$BUILDTIMESTAMP -extldflags $LDFLAGS" \
-o $_pkgname .
}