~alpine/aports

1

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

Details
Message ID
<CAF05aURXoWXH=qUhF4dffmqUZg58XuoBGW-urdhsKHa3oHnRog@mail.gmail.com>
Sender timestamp
1436299849
DKIM signature
missing
Download raw message
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
@@ -0,0 +1,49 @@
+# Contributor: Ben Bailey <bennettbailey@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
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20150713084017.50b9a6de@ncopa-desktop.alpinelinux.org>
In-Reply-To
<CAF05aURXoWXH=qUhF4dffmqUZg58XuoBGW-urdhsKHa3oHnRog@mail.gmail.com> (view parent)
Sender timestamp
1436769617
DKIM signature
missing
Download raw message
On Tue, 7 Jul 2015 15:10:49 -0500
Ben Bailey <bennettbailey@gmail.com> wrote:

> How does this look for a first port?

Hi, thanks, but patch is corrupt.

> 
> 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
> @@ -0,0 +1,49 @@
> +# Contributor: Ben Bailey <bennettbailey@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"

^^^ I think your mailer added a newline here

> +_builddir="$srcdir"/"$pkgname"-"$pkgver"

...

> +
> +md5sums="f509d91e05797b2fe1f9043314dcb6e2  telegraf-0.1.3.tar.gz"
> +sha256sums="ed719e317e9918b314f92cdca09ab7e34fa12c357800fe31cb1c8978a2128f40
> telegraf-0.1.3.tar.gz"
> +sha512sums="aa770900723549ccad5888726888f19419927fff9c76d3764db835dc1d9c1cd892c2ee9420354155759e1a7b381672ff7ae4a742e97107009509db0b04342f09
> telegraf-0.1.3.tar.gz"

^^^^and it added another newline there.

Result is:

Applying: testing/telegraf: new aport
fatal: corrupt patch at line 34
Patch failed at 0001 testing/telegraf: new aport

I wonder if you should sent the patch as an attachment instead.

> --
> 2.4.1
> 



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)