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 /PKGBUILD | |
parent | 654b6512bd85a098e89a9b4b0d962722eb178c6c (diff) | |
download | aur-chrono.tar.gz |
add LDFLAGS to set correct version information
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 . } |