summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD13
1 files changed, 7 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d04fadf26c1..fbc79cf974b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,18 +8,19 @@ pkgdesc="Utility for simplifying the Git usage"
arch=('x86_64')
url="https://github.com/orhun/god"
license=('GPL3')
-makedepends=('go')
+makedepends=('go' 'git')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('a1071f7fe4c9a3e705bd72e4dfd3a112483761a7cbe994d2f0896f8e14c3c4a74445d584b6ebd8daf0847af110a7808d56032534c29c3cda3b8dbe7b79d10c39')
build() {
cd "$pkgname-$pkgver"
+ 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 get -d ./...
- go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
- -o "$pkgname" .
+ go build -o "$pkgname" .
}
package() {