diff options
author | Anatoly Bashmakov | 2021-12-08 16:16:34 +0200 |
---|---|---|
committer | Anatoly Bashmakov | 2021-12-08 16:18:58 +0200 |
commit | 2d4280b9a587e5d922764cd3ff673c68b728aa7e (patch) | |
tree | d71cc65c027d937f1401c66faf09745277c10d46 | |
parent | a764daaa04a9fca9cc65ba49043abd28d7e66a13 (diff) | |
download | aur-httpstat-go.tar.gz |
new upstream release
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 31 insertions, 22 deletions
@@ -1,15 +1,12 @@ pkgbase = httpstat-go pkgdesc = It's like curl -v, with colours. - pkgver = 1.0.0 + pkgver = 1.1.0 pkgrel = 1 url = https://github.com/davecheney/httpstat arch = x86_64 - arch = i686 license = MIT - source_x86_64 = httpstat::https://github.com/davecheney/httpstat/releases/download/v1.0.0/httpstat-linux-amd64-v1.0.0 - md5sums_x86_64 = 9389453ae98f90c1514ae4b60049ac10 - source_i686 = httpstat::https://github.com/davecheney/httpstat/releases/download/v1.0.0/httpstat-linux-386-v1.0.0 - md5sums_i686 = 9389453ae98f90c1514ae4b60049ac10 + makedepends = go + source = httpstat-1.1.0.tar.gz::https://github.com/davecheney/httpstat/archive/refs/tags/v1.1.0.tar.gz + sha256sums = 58260ab0a56557d0c2509ea09ee3fe54fe21a49f95d94189efdd64caec84fa67 pkgname = httpstat-go - @@ -1,23 +1,35 @@ -# Maintainer: 4679kun <4679kun@outlook.com> +# Maintainer: Anatoly Bashmakov <anatoly at posteo.net> +# Contributor: 4679kun <4679kun at outlook.com> -pkgname=httpstat-go _pkgname=httpstat -pkgver=1.0.0 +pkgname=$_pkgname-go +pkgver=1.1.0 pkgrel=1 pkgdesc="It's like curl -v, with colours." -arch=('x86_64' 'i686') -url="https://github.com/davecheney/httpstat" +arch=('x86_64') +url='https://github.com/davecheney/httpstat' license=('MIT') -if [ "$CARCH" = "i686" ]; then - _PKGARCH=386 -else - _PKGARCH=amd64 -fi -source_x86_64=("httpstat::https://github.com/davecheney/httpstat/releases/download/v1.0.0/httpstat-linux-amd64-v1.0.0") -source_i686=("httpstat::https://github.com/davecheney/httpstat/releases/download/v1.0.0/httpstat-linux-386-v1.0.0") -md5sums_x86_64=('9389453ae98f90c1514ae4b60049ac10') -md5sums_i686=('9389453ae98f90c1514ae4b60049ac10') +makedepends=('go') +source=("$_pkgname-$pkgver.tar.gz::https://github.com/davecheney/httpstat/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('58260ab0a56557d0c2509ea09ee3fe54fe21a49f95d94189efdd64caec84fa67') + +prepare() { + cd "$srcdir/$_pkgname-$pkgver" + mkdir -p build +} + +build() { + cd "$srcdir/$_pkgname-$pkgver" + mkdir -p build + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build/$_pkgname +} package() { - install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + cd "$srcdir/$_pkgname-$pkgver" + install -Dm755 build/$_pkgname "$pkgdir"/usr/bin/$_pkgname } |