summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Swift2020-05-25 11:02:32 -0400
committerMikhail Swift2020-05-25 11:02:32 -0400
commitf31b4cca292e173b8328a780dc6f1804f6262332 (patch)
tree71c669e692c8a32c152860d5b9461d88a46208ea
parent3b4419938dc198dba7a23bdcceb82458726fe882 (diff)
downloadaur-f31b4cca292e173b8328a780dc6f1804f6262332.tar.gz
Modify pkgbuild to use new recommended go package guidelines
* Use recommended build options from the wiki's Go package guidelines * Bump version to 0.8.0-2
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD16
2 files changed, 8 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e8f3081c0b71..1bbc79c01459 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lazydocker
pkgdesc = A simple terminal UI for docker and docker-compose, written in Go with the gocui library.
pkgver = 0.8
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jesseduffield/lazydocker
arch = 1686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 50902ade49f8..ea9548ae15ef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Mikhail Swift <mikhail.swift@gmail.com>
pkgname=lazydocker
pkgver=0.8
-pkgrel=1
+pkgrel=2
pkgdesc='A simple terminal UI for docker and docker-compose, written in Go with the gocui library.'
arch=('1686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url='https://github.com/jesseduffield/lazydocker'
@@ -12,14 +12,12 @@ sha1sums=('286dd183eb16ace1689dddb2c44f21f657e13b74')
build() {
cd "${pkgname}-${pkgver}"
- go build \
- -gcflags=all=-trimpath=${PWD} \
- -asmflags=all=-trimpath=${PWD} \
- -ldflags=-extldflags=-zrelro \
- -ldflags=-extldflags=-znow \
- -ldflags "-s -w -X main.version=${pkgver}" \
- -o ${pkgname} \
- main.go
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o ${pkgname} main.go
}
package() {