summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChocobo12023-06-28 20:13:19 +0800
committerChocobo12023-06-28 20:19:51 +0800
commitc4c32cfb9546ffb464229af5d7ca0fc4e840b7f2 (patch)
tree5ac2f159cb1d0f0ac9a4dfc3425d67a72c2097c3 /PKGBUILD
downloadaur-c4c32cfb9546ffb464229af5d7ca0fc4e840b7f2.tar.gz
newpkg: hey-git 0.1.4.r5.g8985827-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..db10e365795c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=hey-git
+pkgver=0.1.4.r5.g8985827
+pkgrel=1
+pkgdesc="HTTP load generator, ApacheBench (ab) replacement"
+arch=('i686' 'x86_64')
+url="https://github.com/rakyll/hey"
+license=('Apache')
+depends=('glibc')
+makedepends=('git' 'go')
+provides=("hey=$pkgver")
+conflicts=('hey')
+source=("git+https://github.com/rakyll/hey.git")
+sha256sums=('SKIP')
+
+
+export CGO_CPPFLAGS="${CPPFLAGS}"
+export CGO_CFLAGS="${CFLAGS}"
+export CGO_CXXFLAGS="${CXXFLAGS}"
+export CGO_LDFLAGS="${LDFLAGS}"
+export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
+
+pkgver() {
+ cd "hey"
+
+ _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
+ _rev=$(git rev-list --count $_tag..HEAD)
+ _hash=$(git rev-parse --short HEAD)
+ printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
+}
+
+build() {
+ cd "hey"
+
+ go build \
+ ./...
+}
+
+check() {
+ cd "hey"
+
+ go test \
+ ./...
+}
+
+package() {
+ cd "hey"
+
+ GOBIN="$pkgdir/usr/bin" \
+ go install ./
+}