blob: 2557211389765cb92390f6dc5f6142dda83f6183 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Maintainer: Jeff Henson <jeff@henson.io>
# Old Maintainer: Andy Nicholson <andrew@anicholson.net>
# Contributors: teutat3s
pkgname=k6
pkgver=1.0.0
pkgrel=1
pkgdesc="A modern load testing tool, using Go and JavaScript"
arch=('x86_64' 'i686')
url="https://github.com/grafana/k6"
license=('AGPL3')
depends=('glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('790e8a1d1171262095edbd5df5a74f18406d11ea88098560d0f18b7614c8b880')
build() {
cd "${pkgname}-${pkgver}"
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 ${pkgname}
}
package() {
cd "${pkgname}-${pkgver}"
install -vDm 755 ${pkgname} -t "${pkgdir}/usr/bin/"
install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
install -vDm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
# build bash completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
./${pkgname} completion bash > "${pkgdir}/usr/share/bash-completion/completions/k6"
# build zsh completions
mkdir -p "${pkgdir}/usr/share/zsh/site-functions"
./${pkgname} completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_k6"
# build fish completions
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
./${pkgname} completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/k6.fish"
}
|