Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/telegraf: new aport

From: Ben Bailey <bennettbailey_at_gmail.com>
Date: Tue, 7 Jul 2015 15:10:49 -0500

How does this look for a first port?

https://github.com/influxdb/telegraf
plugin-driven server agent for reporting metrics into InfluxDB
---
 testing/telegraf/APKBUILD | 49
+++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 testing/telegraf/APKBUILD
diff --git a/testing/telegraf/APKBUILD b/testing/telegraf/APKBUILD
new file mode 100644
index 0000000..3c6b4f0
--- /dev/null
+++ b/testing/telegraf/APKBUILD
_at__at_ -0,0 +1,49 @@
+# Contributor: Ben Bailey <bennettbailey_at_gmail.com>
+# Maintainer:
+pkgname=telegraf
+pkgver=0.1.3
+pkgrel=0
+pkgdesc="plugin-driven server agent for reporting metrics into InfluxDB"
+url="https://github.com/influxdb/telegraf"
+arch="x86_64"
+license="MIT"
+depends=""
+depends_dev="go coreutils"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::
https://github.com/influxdb/telegraf/archive/v${pkgver}.tar.gz"
+_builddir="$srcdir"/"$pkgname"-"$pkgver"
+prepare() {
+  local i
+  cd "$_builddir"
+  for i in $source; do
+    case $i in
+    *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+    esac
+  done
+}
+
+build() {
+  export GOPATH="$srcdir"
+  export GOBIN="$GOPATH"/"$pkgname"/src/bin
+  export GOROOT=/usr/lib/go
+  unset CC
+  cd "$_builddir"
+  /usr/bin/go get -d ./...
+
+  #go build cmd/telegraf || return 1
+  /usr/bin/go install ./cmd/telegraf || return 1
+}
+
+package() {
+  cd "$_builddir"
+
+  install -dm755 "$pkgdir"/usr/bin || return 1
+  install -Dm755  $GOBIN/"$pkgname" "$pkgdir"/usr/bin
+  rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="f509d91e05797b2fe1f9043314dcb6e2  telegraf-0.1.3.tar.gz"
+sha256sums="ed719e317e9918b314f92cdca09ab7e34fa12c357800fe31cb1c8978a2128f40
telegraf-0.1.3.tar.gz"
+sha512sums="aa770900723549ccad5888726888f19419927fff9c76d3764db835dc1d9c1cd892c2ee9420354155759e1a7b381672ff7ae4a742e97107009509db0b04342f09
telegraf-0.1.3.tar.gz"
--
2.4.1
-- 
Ben
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jul 07 2015 - 15:10:49 GMT