summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ramsden2020-05-23 18:30:48 -0700
committerJohn Ramsden2020-05-23 18:30:48 -0700
commitc845d3fe878e33e6729fc975eb710e7f9c6709c5 (patch)
tree8954685b4f1b6690a7d067250460a4c7df05e817
parentde8e44bc9215cf26fd7361a9d90b23ba53905f51 (diff)
downloadaur-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--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 8 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1a1d84cd3416..65adcc0ffc4e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index bc5f5481c31d..512e57b08625 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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}" .
}