summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 09:34:54 +0300
committerDimitris Kiziridis2020-05-20 09:34:54 +0300
commit811f5900c8646181ce6bf86bbe27b940ebfe2dff (patch)
tree40e52a860f0cf8d6089b706fbab8beecc7fd7054
parent46f451f78618ee4feb876e1da29b6da58367f67c (diff)
downloadaur-811f5900c8646181ce6bf86bbe27b940ebfe2dff.tar.gz
update pkgbuild, go-pie replaced
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD20
2 files changed, 14 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 46387e9c34e2..f53cfae34e72 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,7 @@ pkgbase = gocity
url = https://go-city.github.io
arch = x86_64
license = MIT
- makedepends = go-pie
+ makedepends = go
depends = glibc
provides = gocity
source = gocity-1.0.0.tar.gz::https://github.com/rodrigo-brito/gocity/archive/v1.0.0.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index d4280f5a4bb4..8205bc96a6bb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,21 +9,27 @@ url='https://go-city.github.io'
license=('MIT')
provides=('gocity')
depends=('glibc')
-makedepends=('go-pie')
+makedepends=('go')
source=("gocity-${pkgver}.tar.gz::https://github.com/rodrigo-brito/gocity/archive/v${pkgver}.tar.gz")
sha256sums=('dfe6cc9b7845f47d4850b1d30fe5246a40e2635d71824a29dbb13bffce2d40a2')
+prepare() {
+ cd "${srcdir}/gocity-${pkgver}"
+ mkdir -p build/
+}
+
build() {
cd "${srcdir}/gocity-${pkgver}"
- mkdir -p $srcdir/go
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go build -v -o "../gocity-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}/gocity-${pkgver}"
- install -Dm755 ../gocity-bin "${pkgdir}/usr/bin/gocity"
+ install -Dm755 build/gocity "${pkgdir}/usr/bin/gocity"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/gocity/LICENSE"
- go clean -modcache #Remove go libraries
} \ No newline at end of file