diff options
author | John Ramsden | 2020-05-23 18:30:48 -0700 |
---|---|---|
committer | John Ramsden | 2020-05-23 18:30:48 -0700 |
commit | c845d3fe878e33e6729fc975eb710e7f9c6709c5 (patch) | |
tree | 8954685b4f1b6690a7d067250460a4c7df05e817 | |
parent | de8e44bc9215cf26fd7361a9d90b23ba53905f51 (diff) | |
download | aur-c845d3fe878e33e6729fc975eb710e7f9c6709c5.tar.gz |
Update according to 'Go package guidelines'
See
* https://wiki.archlinux.org/index.php/Go_package_guidelines
* RFC: go-pie removal in favour of GOFLAGS (Mailing list)
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 8 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = zrepl pkgdesc = One-stop ZFS backup & replication solution pkgver = 0.2.1 - pkgrel = 2 + pkgrel = 3 url = https://zrepl.github.io/ arch = x86_64 license = MIT @@ -2,7 +2,7 @@ pkgname=zrepl pkgver=0.2.1 -pkgrel=2 +pkgrel=3 pkgdesc='One-stop ZFS backup & replication solution' arch=('x86_64') url='https://zrepl.github.io/' @@ -16,14 +16,15 @@ sha256sums=('df474e70f5a51d84816ee8a06038ded167a7548e547e2d2822c313f088eeeafd') zrepl_version="arch-${pkgver}" build() { + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + GO_LDFLAGS="-X github.com/zrepl/zrepl/version.zreplVersion=${zrepl_version}" + cd "${pkgname}-${pkgver}" go build \ - -trimpath \ - -buildmode=pie \ - -mod=vendor \ - -mod=readonly \ - -modcacherw \ -ldflags "${GO_LDFLAGS} -extldflags ${LDFLAGS}" \ -o "${pkgname}" . } |