diff options
author | Ben Aaron Goldberg | 2021-11-25 01:43:34 -0500 |
---|---|---|
committer | Ben Aaron Goldberg | 2021-11-25 01:43:34 -0500 |
commit | aacf1f18c680c8e54e8723cd9d5ce22c87559301 (patch) | |
tree | b6e6ba27022f5180be40a1d81551ba98f2930be0 | |
parent | 213f685afb09596a01785b018fd7da9dd7935c23 (diff) | |
download | aur-aacf1f18c680c8e54e8723cd9d5ce22c87559301.tar.gz |
Fix build so that go doesn't complain about the lack of a module
Signed-off-by: Ben Aaron Goldberg <ben@benaaron.dev>
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 12 |
2 files changed, 11 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = gemcert-git pkgdesc = A simple tool for creating self-signed certs for use in Geminispace. pkgver = r15.fc14deb - pkgrel = 2 + pkgrel = 3 url = https://tildegit.org/solderpunk/gemcert arch = i686 arch = pentium4 @@ -19,4 +19,3 @@ pkgbase = gemcert-git sha256sums = SKIP pkgname = gemcert-git - @@ -2,7 +2,7 @@ pkgname=gemcert-git pkgver=r15.fc14deb -pkgrel=2 +pkgrel=3 pkgdesc="A simple tool for creating self-signed certs for use in Geminispace." arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') makedepends=('go' 'git') @@ -21,6 +21,8 @@ pkgver() { prepare() { cd "$srcdir/gemcert" mkdir -p build/ + go mod init "${url#https://}" # strip https:// from canonical URL + go mod tidy } build() { @@ -30,7 +32,13 @@ build() { export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" - go build -o build/gemcert main.go + go build -o build/gemcert \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ + main.go } check() { |