summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormutantmonkey2020-11-20 22:58:47 -0800
committermutantmonkey2020-11-20 22:58:47 -0800
commitbb52896c8ef167949b08ac0ecd3ee7bbf1950df7 (patch)
tree90652c92cfa7c85945b8d2309f5254e69ede2b11
parentc0295c47f8b396496c2f5bff8dfb675c3911356c (diff)
downloadaur-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--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 15 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11b65122c98a..4947b332e0d5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 28ddca253b30..aa9d53dc8126 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {