# Maintainer: orhun # https://github.com/orhun/pkgbuilds pkgname=ali-git pkgdesc="Generate HTTP load and plot the results in real-time (git)" pkgver=0.3.3.r0.gfd4e04b pkgrel=1 arch=('x86_64') url="https://github.com/nakabonne/ali" license=('MIT') makedepends=('git' 'go') conflicts=("${pkgname%-git}" "${pkgname%-git}-bin") provides=("${pkgname%-git}") source=("git+$url") sha256sums=('SKIP') pkgver() { cd "${pkgname%-git}" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "${pkgname%-git}" go get -d ./... go build \ -gcflags "all=-trimpath=$PWD" \ -asmflags "all=-trimpath=$PWD" \ -ldflags "-extldflags $LDFLAGS" \ -o "${pkgname%-git}" . } package() { cd "${pkgname%-git}" install -Dm 755 "${pkgname%-git}" -t "$pkgdir/usr/bin" install -Dm 644 README.md -t "$pkgdir/usr/share/doc/${pkgname%-git}" install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}" }