summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 07:17:42 +0300
committerDimitris Kiziridis2020-05-20 07:17:42 +0300
commit3c9bebe064fd9c4da1cac61a465900e7f20da958 (patch)
tree250e1a92615ab2958768048fda2a4d78e8b08dac
parentcb8cb77e4a139294d7750aeb733970241153be95 (diff)
downloadaur-3c9bebe064fd9c4da1cac61a465900e7f20da958.tar.gz
update pkgbuild, go-pie replaced
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD21
2 files changed, 11 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 23a90842af1..92902dc646f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,7 @@ pkgbase = asciigraph
url = https://github.com/guptarohit/asciigraph
arch = x86_64
license = BSD
- makedepends = go-pie
+ makedepends = go
depends = glibc
source = asciigraph-0.4.1.tar.gz::https://github.com/guptarohit/asciigraph/archive/v0.4.1.tar.gz
sha256sums = 5f8dc2e2dcfb253ebc0b23e824a590ae38e20a4d180393d175e25fa0f21d547d
diff --git a/PKGBUILD b/PKGBUILD
index a93fe8069df..2feaa3c8b02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,28 +8,27 @@ arch=('x86_64')
url='https://github.com/guptarohit/asciigraph'
license=('BSD')
depends=('glibc')
-makedepends=('go-pie')
+makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/guptarohit/asciigraph/archive/v${pkgver}.tar.gz")
sha256sums=('5f8dc2e2dcfb253ebc0b23e824a590ae38e20a4d180393d175e25fa0f21d547d')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
- mkdir -p $srcdir/go
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go get -d -v ./...
+ mkdir -p build/
}
build() {
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- cd "${srcdir}/${pkgname}-${pkgver}/cmd/asciigraph"
- go build -v -o "${srcdir}/asciigraph-bin"
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ 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 ./cmd/...
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- install -Dm755 ../asciigraph-bin "${pkgdir}/usr/bin/asciigraph"
+ install -Dm755 build/asciigraph "${pkgdir}/usr/bin/asciigraph"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/asciigraph/LICENSE"
- go clean -modcache #Remove go libraries
} \ No newline at end of file