summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Aaron Goldberg2021-11-25 01:43:34 -0500
committerBen Aaron Goldberg2021-11-25 01:43:34 -0500
commitaacf1f18c680c8e54e8723cd9d5ce22c87559301 (patch)
treeb6e6ba27022f5180be40a1d81551ba98f2930be0
parent213f685afb09596a01785b018fd7da9dd7935c23 (diff)
downloadaur-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--.SRCINFO3
-rw-r--r--PKGBUILD12
2 files changed, 11 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dbeb365be192..3eb8cf425619 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
-
diff --git a/PKGBUILD b/PKGBUILD
index 7600d5cbf134..fca7164d6922 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {