Package Details: grafterm 0.2.0-1

Git Clone URL: https://aur.archlinux.org/grafterm.git (read-only, click to copy)
Package Base: grafterm
Description: Metrics dashboards on terminal (a grafana inspired terminal version)
Upstream URL: https://github.com/slok/grafterm
Licenses: Apache
Submitter: navigaid
Maintainer: navigaid
Last Packager: navigaid
Votes: 0
Popularity: 0.000000
First Submitted: 2019-10-11 04:32 (UTC)
Last Updated: 2019-10-11 04:32 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

fuero commented on 2025-09-06 09:39 (UTC) (edited on 2025-09-06 09:40 (UTC) by fuero)

I had to modify the package slightly to make it build and to satisfy namcap - perhaps you want to apply those changes:

diff --git a/PKGBUILD b/PKGBUILD
index c175e54..bc03fdd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,39 @@ pkgrel=1
 pkgdesc='Metrics dashboards on terminal (a grafana inspired terminal version)'
 arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
 url='https://github.com/slok/grafterm'
-license=('Apache')
+license=('Apache-2.0')
 makedepends=('go')
+depends=('glibc')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/slok/grafterm/archive/v${pkgver}.tar.gz")
-md5sums=('1d70552f7304335092679e69a18af44f')
+sha256sums=('00832f5f9882afead6048be8c6221f3ddd95325376b370b7f25b87cc4d840b21')
+b2sums=('e032b5fb29086e4b1e6186f18ec76c6a3ebcc46a9e79f1db8570ef20bf14bc00df947d9e0f262d9035880a3d62fd2d22cc76f0ff339192c37c41ba26ef3e461e')

 build() {
+  local _x _commit
+  _commit=$(bsdcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id)
+  _x=(
+    Date="$(date +%s)"
+    Version="v${pkgver}"
+    Commit="${_commit:?}"
+  )
+  export CGO_ENABLED=1
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export GOFLAGS="${GOFLAGS} -buildmode=pie -trimpath -modcacherw -mod=readonly -v"
+  export GO111MODULE=on
+  export GOPROXY=direct
   cd ${pkgname}-${pkgver}
-  go1.13 build ./cmd/${pkgname}
+  go build \
+    -ldflags="-s -w ${_x[*]/#/-X=main.}" \
+    -o bin/${pkgname} \
+    ./cmd/${pkgname}
 }

 package() {
   cd ${pkgname}-${pkgver}
-  install -Dm755 ${pkgname} "${pkgdir}/usr/bin/${pkgname}"
+  install -Dm755 bin/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 Readme.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
 }