diff options
author | mutantmonkey | 2020-11-20 22:58:47 -0800 |
---|---|---|
committer | mutantmonkey | 2020-11-20 22:58:47 -0800 |
commit | bb52896c8ef167949b08ac0ecd3ee7bbf1950df7 (patch) | |
tree | 90652c92cfa7c85945b8d2309f5254e69ede2b11 | |
parent | c0295c47f8b396496c2f5bff8dfb675c3911356c (diff) | |
download | aur-bb52896c8ef167949b08ac0ecd3ee7bbf1950df7.tar.gz |
upgpkg: golinx 1.0-2
Set flags and build options as described here:
https://wiki.archlinux.org/index.php/Go_package_guidelines#Building
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 17 |
2 files changed, 15 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = golinx pkgdesc = A client for linx-server written in Go pkgver = 1.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/mutantmonkey/golinx arch = i686 arch = x86_64 @@ -1,7 +1,7 @@ # Maintainer: mutantmonkey <aur@mutantmonkey.in> pkgname=golinx pkgver=1.0 -pkgrel=1 +pkgrel=2 pkgdesc="A client for linx-server written in Go" url="https://github.com/mutantmonkey/golinx" arch=('i686' 'x86_64') @@ -11,9 +11,20 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mutantmonkey/${pkgname} sha256sums=('a5a0b1ff433d8a9b66b3c9115b574472ffa0aeb8c0e929d19fe67c24a3bc2a53') build() { + export GOPATH="$srcdir" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + cd "$srcdir/$pkgname-$pkgver" - GOPATH="$srcdir" go get -v -d - GOPATH="$srcdir" go build + go get -v -d + go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ + . } package() { |