diff options
author | Jordan Knott | 2019-02-01 16:49:18 -0600 |
---|---|---|
committer | Jordan Knott | 2019-02-01 16:49:29 -0600 |
commit | 47a19088792b53fd6d9920e9b7146023d3cbfcbe (patch) | |
tree | 28ff6802d82739743643773cf6cf0a04647c99bd | |
parent | 654b6512bd85a098e89a9b4b0d962722eb178c6c (diff) | |
download | aur-chrono.tar.gz |
add LDFLAGS to set correct version information
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -1,7 +1,7 @@ pkgbase = chrono pkgdesc = A time tracking tool made with love pkgver = 1.0.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/gochrono/chrono arch = x86_64 license = MIT @@ -2,7 +2,7 @@ # Contributor: Jordan Knott <jordan at jordanthedev dot com> pkgname=chrono pkgver=1.0.1 -pkgrel=1 +pkgrel=2 pkgdesc='A time tracking tool made with love' arch=('x86_64') url="https://github.com/gochrono/${pkgname}" @@ -15,10 +15,16 @@ md5sums=('SKIP') build() { cd $pkgname + + PACKAGE="github.com/gochrono/chrono" + EXTLDFLAGS=${LDFLAGS} + LDFLAGS="-X ${PACKAGE}/commands.commit=`git rev-parse --short HEAD` + -X ${PACKAGE}/commands.version=${pkgver}" + go build \ -gcflags "all=-trimpath=$PWD" \ -asmflags "all=-trimpath=$PWD" \ - -ldflags "-extldflags $LDFLAGS" \ + -ldflags "-extldflags ${EXTLDFLAGS} ${LDFLAGS}" \ -o $pkgname . } |