summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 07:47:02 +0300
committerDimitris Kiziridis2020-05-20 07:47:02 +0300
commit81e820b9c826b80f883adef3d8d4d892e9795d9d (patch)
treecd9451ab1d173006af02bd0a79ce8641f87b2d85
parentfd0109e396ca33ad6144005ccf11d8b985653672 (diff)
downloadaur-81e820b9c826b80f883adef3d8d4d892e9795d9d.tar.gz
update pkgbuild, go-pie replaced
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
2 files changed, 10 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 56ffda65fcb6..11b0e7bc5587 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,7 +6,7 @@ pkgbase = c4go-git
arch = x86_64
license = MIT
makedepends = git
- makedepends = go-pie
+ makedepends = go
depends = clang
provides = c4go
source = git+https://github.com/Konstantin8105/c4go
diff --git a/PKGBUILD b/PKGBUILD
index 99e213391e8c..d2c5fd26ece5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ url='https://github.com/Konstantin8105/c4go'
license=('MIT')
provides=('c4go')
depends=('clang')
-makedepends=('git' 'go-pie')
+makedepends=('git' 'go')
source=("git+${url}")
sha256sums=('SKIP')
@@ -24,22 +24,21 @@ pkgver() {
prepare() {
cd "${srcdir}/${_pkgname}"
- mkdir -p $srcdir/go
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go get -d -v ./...
+ mkdir -p build/
}
build() {
cd "${srcdir}/${_pkgname}"
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go build -v -o "../${_pkgname}-bin"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o build ./...
}
package() {
cd "${srcdir}/${_pkgname}"
- install -Dm755 ../${_pkgname}-bin "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm755 build/c4go "${pkgdir}/usr/bin/${_pkgname}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- go clean -modcache #Remove go libraries
} \ No newline at end of file