blob: 6b66ee69294d59eab8000d8a73ea877d0d0a39b7 (
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
45
46
|
# Contributor: Katie Holly <holly@fuslvz.ws>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=telegraf
pkgver=1.14.1
pkgrel=0
_commit=33dd867d # git rev-parse --short HEAD
_branch=release-1.14 # Just increment together with $pkgver
pkgdesc="A plugin-driven server agent for collecting & reporting metrics, part of the InfluxDB project"
url="https://www.influxdata.com/time-series-platform/telegraf/"
arch="x86_64 aarch64"
license="MIT"
makedepends="go binutils-gold linux-headers"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
options="net chmod-clean"
source="telegraf-$pkgver.tar.gz::https://github.com/influxdata/telegraf/archive/v$pkgver.tar.gz
telegraf.initd
telegraf.confd
"
export GOPATH=${GOPATH:-$srcdir/go}
export GOCACHE=${GOCACHE:-$srcdir/go-build}
export GOTMPDIR=${GOTMPDIR:-$srcdir}
build() {
local ldflags="-X main.version=$pkgver -X main.branch=$_branch -X main.commit=$_commit"
go build -ldflags "$ldflags" ./cmd/telegraf
}
check() {
# filecount tests are excluded because they depend on exact file sizes
# which depend on filesystem used.
go test -short $(go list ./... | grep -v plugins/inputs/filecount)
}
package() {
install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
install -Dm644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
install -Dm755 "$builddir/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "$builddir/etc/$pkgname.conf" "$pkgdir/etc/$pkgname.conf"
install -dm755 "$pkgdir/etc/$pkgname.conf.d"
}
sha512sums="aa6e1b338dce0d9f46efa9a87e8cb841d9989014cce37920ddb9089a6930a3e664b8e181de05903336c360cd4429963435d4e79714a86ccd953ca1da9e016163 telegraf-1.14.1.tar.gz
abe483deb8e12fe140de2c36d17bbfbc97ed7a5de8c3d76162357f7ba6575b8236b7197b92a26ed6d54f95c1ccbfc12ca62d6cc0371bf49d10a1ea5622a51ed1 telegraf.initd
d1a9aa57f8b5179f2d8396518b9db757fe1c40337b515c1f750cf577683ff15f3174bc757afa70d880a1fef809c873e6aa0da1b903a5a97934c14965712d47a4 telegraf.confd"
|