1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
2 # Contributor: Nicolas Leclercq <nicolas.private@gmail.com>
3 # Contributor: Adam S Levy <adam@aslevy.com>
4 # Contributor: Charles B. Johnson <mail@cbjohnson.info>
5 # Contributor: Daichi Shinozaki <dsdseg@gmail.com>
6 # Contributor: Ben Alex <ben.alex@acegi.com.au>
12 pkgdesc='CLI for managing resources in InfluxDB'
14 url='https://github.com/InfluxData/influx-cli'
16 makedepends=('go' 'go-tools' 'git')
18 backup=('etc/influxdb/influxdb.conf')
19 source=("git+https://github.com/influxdata/influx-cli.git#tag=v${pkgver}")
24 export CGO_CPPFLAGS="${CPPFLAGS}"
25 export CGO_CFLAGS="${CFLAGS}"
26 export CGO_CXXFLAGS="${CXXFLAGS}"
27 export CGO_LDFLAGS="${LDFLAGS}"
28 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
29 export LDFLAGS="-linkmode external"
30 PATH="$(go env GOPATH)/bin:$PATH" make VERSION=$pkgver COMMIT=$_commit_sha
35 PATH="$(go env GOPATH)/bin:$PATH" make test
40 install -Dm755 bin/linux/amd64/influx -t "$pkgdir/usr/bin"
41 install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname}"
42 bin/linux/influx completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/influx-cli"
43 bin/linux/influx completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_influx-cli"
44 #bin/linux/influx completion fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/influx-cli.fish"