summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lublin2023-04-10 09:55:00 +0200
committerDaniel Lublin2023-04-10 09:55:00 +0200
commit618e421f8bb514b1d1f0efb89d1557afbe3c045b (patch)
treedec995b1231ee68675ec3c6a3b23c083fc71a607
parentd0ac869d5fbfea6b65a57199627a4d8f591302a0 (diff)
downloadaur-618e421f8bb514b1d1f0efb89d1557afbe3c045b.tar.gz
Build like https://wiki.archlinux.org/title/Go_package_guidelines
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 8 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c0527723858..8daab8127770 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = i3gopher
pkgdesc = i3 / sway wm helper rodent - focus the last focused window (per workspace)
pkgver = 1.2.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/quite/i3gopher
arch = x86_64
license = BSD
diff --git a/PKGBUILD b/PKGBUILD
index 68ab6105e9bf..0d8b98f814db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=i3gopher
pkgver=1.2.0
-pkgrel=2
+pkgrel=3
pkgdesc='i3 / sway wm helper rodent - focus the last focused window (per workspace)'
arch=('x86_64')
url="https://github.com/quite/i3gopher"
@@ -13,11 +13,12 @@ sha256sums=('bb50763366ef1d46b6832a1b536fee808cdbceff5c98d50024aa0cefc6c3102a')
build() {
cd $pkgname-$pkgver
- go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
- -o $pkgname .
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o $pkgname .
}
package() {