diff options
author | Daniel Lublin | 2023-04-10 09:55:00 +0200 |
---|---|---|
committer | Daniel Lublin | 2023-04-10 09:55:00 +0200 |
commit | 618e421f8bb514b1d1f0efb89d1557afbe3c045b (patch) | |
tree | dec995b1231ee68675ec3c6a3b23c083fc71a607 | |
parent | d0ac869d5fbfea6b65a57199627a4d8f591302a0 (diff) | |
download | aur-618e421f8bb514b1d1f0efb89d1557afbe3c045b.tar.gz |
Build like https://wiki.archlinux.org/title/Go_package_guidelines
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 8 insertions, 7 deletions
@@ -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 @@ -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() { |