summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authororhun2020-11-25 18:47:39 +0300
committerorhun2020-11-25 18:47:39 +0300
commite939061f1595995dbf9616878ec06286688db63c (patch)
treec754dbd1807fdfb4d1b4cea8691f1ef0a785e1ff
parent06d42918782da0082ec46ac290ae7c11abed39d2 (diff)
downloadaur-god.tar.gz
upgpkg: god 1.10-1
upstream release Respect go flags for PIE and RELRO
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD13
2 files changed, 8 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index faed226454f..acab7d2952e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,6 +6,7 @@ pkgbase = god
arch = x86_64
license = GPL3
makedepends = go
+ makedepends = git
source = god-1.10.tar.gz::https://github.com/orhun/god/archive/1.10.tar.gz
sha512sums = a1071f7fe4c9a3e705bd72e4dfd3a112483761a7cbe994d2f0896f8e14c3c4a74445d584b6ebd8daf0847af110a7808d56032534c29c3cda3b8dbe7b79d10c39
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() {