diff options
author | Olivier Biesmans | 2016-06-30 22:23:12 +1000 |
---|---|---|
committer | Olivier Biesmans | 2016-06-30 22:35:22 +1000 |
commit | f7e5197f228696364bb7b58ca9c4e496624286a2 (patch) | |
tree | dbc483d1ff9d277f9348b55070d195cb575e0ad0 /PKGBUILD | |
download | aur-go-boom-git.tar.gz |
Package boom-git
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..234f53af8702 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Olivier Biesmans <o.archlinux@biesmans.fr> + +_pkgname=boom +_gopkgname=github.com/rakyll/boom +pkgname=go-$_pkgname-git +pkgver=r188.4a00fe2 +pkgrel=1 +pkgdesc="HTTP(S) load generator, ApacheBench (ab) replacement, written in Go" +arch=('x86_64' 'i686') +url="https://github.com/rakyll/boom" +license=('APACHE') +makedepends=('go' 'git') +depends=() +options=('!strip' '!emptydirs') +source=("$_pkgname::git+https://github.com/rakyll/boom.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + _gopkgpath="$srcdir/gopath/src/github.com/rakyll/boom" + if [[ ! -L "$_gopkgpath" ]]; then + mkdir -p $(dirname $_gopkgpath) + ln -s "$srcdir/boom" "$_gopkgpath" + fi +} + +build() { + GOPATH="$(pwd)/gopath" go build -o "$srcdir/build/$_pkgname" "$_gopkgname" +} + +package() { + install -Dm755 "$srcdir/build/$_pkgname" "$pkgdir/usr/bin/$_pkgname" + install -Dm644 "$srcdir/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: |