diff options
author | Fusl <root@hallowe.lt> | 2018-01-28 09:16:44 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-02-20 18:07:27 +0000 |
commit | b278ca91122ed0faee3da41f801d7cb0c33c9473 (patch) | |
tree | 6a3caf9641c52b31487ee7ccbb77140a354dc4b4 /testing/telegraf/APKBUILD | |
parent | b7e46cc1a7a6a945194e82f1c9d06e6230877355 (diff) | |
download | aports-b278ca91122ed0faee3da41f801d7cb0c33c9473.tar.bz2 aports-b278ca91122ed0faee3da41f801d7cb0c33c9473.tar.xz |
testing/telegraf: new aport
Diffstat (limited to 'testing/telegraf/APKBUILD')
-rw-r--r-- | testing/telegraf/APKBUILD | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/telegraf/APKBUILD b/testing/telegraf/APKBUILD new file mode 100644 index 0000000000..ef8b4f8774 --- /dev/null +++ b/testing/telegraf/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Katie Holly <holly@fuslvz.ws> +# Maintainer: Katie Holly <holly@fuslvz.ws> +pkgname=telegraf +pkgver=1.5.1 +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 x86" +license="MIT" +makedepends="go" +options="!strip" +install="" +source="$pkgname-$pkgver.tar.gz::https://github.com/influxdata/$pkgname/archive/$pkgver.tar.gz + telegraf-makefile-ldflags.patch + telegraf.initd + " +builddir="$srcdir"/$pkgname-$pkgver +_godir="$srcdir"/go +_vendor=influxdata + +build() { + mkdir -p "$_godir"/bin "$_godir"/src/github.com/"$_vendor" + ln -sf "$builddir" "$_godir"/src/github.com/$_vendor/$pkgname + export GOPATH="$_godir" + export PATH="$PATH:$_godir" + cd "$_godir"/src/github.com/$_vendor/$pkgname + go get -d -v . + make PREFIX=/usr +} + +package() { + mkdir -p "$pkgdir"/usr/bin "$pkgdir"/etc/$pkgname "$pkgdir"/etc/logrotate.d/$pkgname + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -Dm755 "$builddir"/$pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm644 "$builddir"/etc/$pkgname.conf "$pkgdir"/etc/$pkgname/$pkgname.conf + install -Dm644 "$builddir"/etc/logrotate.d/$pkgname "$pkgdir"/etc/logrotate.d/$pkgname +} + +sha512sums="e5b723d4b2d1fa40aa08c3f4def220d9a9a6eb8ab57ca8cb03116ad86b7e43e589592e6e4dfab03f03a3c884b8cc2ccdeab19de4fcf737e32278ab1d9336055a telegraf-1.5.1.tar.gz +f565077f3bea51937b720dab2224bc991cf39a54ec1b5089c708136aa3535ef9fd43df4d2cb138d65634d8430b9b91a0710c30321310974c3d427b99ea374c04 telegraf-makefile-ldflags.patch +5ab5dbc5d0ab735f0909c44dc5bc9748ea724d148e1f69c9beb59a6504944a2b092597cf071d478cb06f78f52321fba68106e8cee52b104d05b031500cdec1e3 telegraf.initd" |