diff options
author | Dimitris Kiziridis | 2020-05-20 09:34:54 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-05-20 09:34:54 +0300 |
commit | 811f5900c8646181ce6bf86bbe27b940ebfe2dff (patch) | |
tree | 40e52a860f0cf8d6089b706fbab8beecc7fd7054 | |
parent | 46f451f78618ee4feb876e1da29b6da58367f67c (diff) | |
download | aur-811f5900c8646181ce6bf86bbe27b940ebfe2dff.tar.gz |
update pkgbuild, go-pie replaced
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 20 |
2 files changed, 14 insertions, 8 deletions
@@ -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 @@ -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 |