summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Bashmakov2021-12-08 16:16:34 +0200
committerAnatoly Bashmakov2021-12-08 16:18:58 +0200
commit2d4280b9a587e5d922764cd3ff673c68b728aa7e (patch)
treed71cc65c027d937f1401c66faf09745277c10d46
parenta764daaa04a9fca9cc65ba49043abd28d7e66a13 (diff)
downloadaur-httpstat-go.tar.gz
new upstream release
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD42
2 files changed, 31 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7656d53409f7..b7a496012d4a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
-
diff --git a/PKGBUILD b/PKGBUILD
index 0f68a5eec31a..0a66d98dada8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}