blob: 7ede05c220032771ae29eb8c54dc448230d21930 (
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
47
48
49
50
51
52
|
# Contributor: Katie Holly <holly@fuslvz.ws>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=telegraf
pkgver=1.13.0
pkgrel=0
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 dep binutils-gold"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="telegraf-$pkgver.tar.gz::https://github.com/influxdata/telegraf/archive/$pkgver.tar.gz
telegraf.initd
telegraf.confd
"
builddir="$srcdir/src/github.com/influxdata/$pkgname"
export GO111MODULE=off # Doesn't support modules mode yet.
export GOPATH="$srcdir"
export GOCACHE=${GOCACHE:-$srcdir/go-build}
export GOTMPDIR=${GOTMPDIR:-$srcdir}
prepare() {
mkdir -p ${builddir%/*}
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
cd "$builddir"
dep ensure -v
default_prepare
}
build() {
go build -ldflags "-X main.version=$pkgver" ./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="a28033aef4b21c3570f0e3bc4e316cd6da691069b7cd3faab5607a5990ec1f2a7d3cf73437ea75a98f825f99ccf47264984c93afe4eb63f348ed4912dea31a83 telegraf-1.13.0.tar.gz
abe483deb8e12fe140de2c36d17bbfbc97ed7a5de8c3d76162357f7ba6575b8236b7197b92a26ed6d54f95c1ccbfc12ca62d6cc0371bf49d10a1ea5622a51ed1 telegraf.initd
90188e1ba88d3a0714e1590f78a2abf3719cbe2f3d734f9c72ded13cf9c8495c1bf6696f2780289775bf53da347eee72aea8fe5555a4754360d1fbaa9d3c362b telegraf.confd"
|