diff options
author | Amin Vakil | 2021-11-14 16:33:36 +0330 |
---|---|---|
committer | Amin Vakil | 2021-11-14 16:33:36 +0330 |
commit | 6e7e69e922675e5ed2b3ab84541e34c865f6d142 (patch) | |
tree | ac81b3ca0bc514c644e0a21350b4d5c1ae6e27bc | |
download | aur-6e7e69e922675e5ed2b3ab84541e34c865f6d142.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 47 |
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bcdcb00cd544 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = ddosify-git + pkgdesc = High-performance load testing tool + pkgver = r266.7658c83 + pkgrel = 1 + url = https://github.com/ddosify/ddosify + arch = any + license = AGPL3 + makedepends = go + makedepends = git + provides = ddosify + conflicts = ddosify + source = git+https://github.com/ddosify/ddosify.git + sha256sums = SKIP + +pkgname = ddosify-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f8a13c2e5d03 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Amin Vakil <info AT aminvakil DOT com> + +pkgname=ddosify-git +pkgver=r266.7658c83 +pkgrel=1 +pkgdesc="High-performance load testing tool" +arch=('any') +url="https://github.com/ddosify/ddosify" +license=('AGPL3') +makedepends=('go' 'git') +source=("git+${url}.git") +provides=('ddosify') +conflicts=('ddosify') +sha256sums=('SKIP') + + +pkgver() { + cd "${srcdir}/${pkgname/-git/}" + + # Get the version number. + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare(){ + cd "${pkgname/-git/}" + mkdir -p build/ +} + +build() { + cd "${pkgname/-git/}" + 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 . +} + +test() { + cd "${pkgname/-git/}" + go test ./... +} + +package() { + cd "${pkgname/-git/}" + install -Dm755 build/${pkgname/-git/} "$pkgdir"/usr/bin/${pkgname/-git/} +} |