From e62eb554b6ab8b056d5902c91ba6d6cc80997435 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 15 Jan 2010 16:00:59 +0000 Subject: testing/rrdbot: new aport an SNMP polling daemon which writes the polled values to an RRD database http://memberwebs.com/stef/software/rrdbot/ --- testing/rrdbot/APKBUILD | 46 ++++++++++++++++++++++++++++++++++++++ testing/rrdbot/rrdbot.post-install | 4 ++++ testing/rrdbot/rrdbot.pre-install | 7 ++++++ testing/rrdbot/rrdbotd.confd | 7 ++++++ testing/rrdbot/rrdbotd.initd | 28 +++++++++++++++++++++++ 5 files changed, 92 insertions(+) create mode 100644 testing/rrdbot/APKBUILD create mode 100644 testing/rrdbot/rrdbot.post-install create mode 100644 testing/rrdbot/rrdbot.pre-install create mode 100644 testing/rrdbot/rrdbotd.confd create mode 100644 testing/rrdbot/rrdbotd.initd (limited to 'testing/rrdbot') diff --git a/testing/rrdbot/APKBUILD b/testing/rrdbot/APKBUILD new file mode 100644 index 00000000..d1f1e17d --- /dev/null +++ b/testing/rrdbot/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Natanael Copa +pkgname=rrdbot +pkgver=0.9.6 +pkgrel=0 +pkgdesc="an SNMP polling daemon which writes the polled values to an RRD database" +url="http://memberwebs.com/stef/software/rrdbot/" +license="BSD" +depends= +makedepends=rrdtool-dev +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-doc" +source="http://memberwebs.com/stef/software/rrdbot/rrdbot-$pkgver.tar.gz + rrdbotd.initd + rrdbotd.confd + " + +# append extra dependencies to -dev subpackage +# remove if not used. +# depends_dev="somepackage-dev" + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + # apply patches here +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + install -m755 -D "$srcdir"/rrdbotd.initd "$pkgdir"/etc/init.d/rrdbotd + install -m644 -D "$srcdir"/rrdbotd.confd "$pkgdir"/etc/conf.d/rrdbotd +} + +md5sums="8329c8f58136158b25c3179e825c66e6 rrdbot-0.9.6.tar.gz +e74785806860537d38a5863fc90b324f rrdbotd.initd +cbcac88f5b728b1441891947a4babbcb rrdbotd.confd" diff --git a/testing/rrdbot/rrdbot.post-install b/testing/rrdbot/rrdbot.post-install new file mode 100644 index 00000000..0586fcd5 --- /dev/null +++ b/testing/rrdbot/rrdbot.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +# add something which happends after install + diff --git a/testing/rrdbot/rrdbot.pre-install b/testing/rrdbot/rrdbot.pre-install new file mode 100644 index 00000000..2c35d02d --- /dev/null +++ b/testing/rrdbot/rrdbot.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +# this user should be included in alpine-baselayout-1.2. +# included here for backward compability. +adduser -H -s /bin/false -D rrdbotd 2>/dev/null + +exit 0 diff --git a/testing/rrdbot/rrdbotd.confd b/testing/rrdbot/rrdbotd.confd new file mode 100644 index 00000000..486252b0 --- /dev/null +++ b/testing/rrdbot/rrdbotd.confd @@ -0,0 +1,7 @@ +# Sample conf.d file for alpine linux + +# +# Specify daemon options here. +# + +sample_opts="" diff --git a/testing/rrdbot/rrdbotd.initd b/testing/rrdbot/rrdbotd.initd new file mode 100644 index 00000000..d0fcdc4a --- /dev/null +++ b/testing/rrdbot/rrdbotd.initd @@ -0,0 +1,28 @@ +#!/sbin/runscript + +name=rrdbotd +daemon=/usr/sbin/$name +pidfile=${rrdbotd_pidfile:-/var/run/rrdbotd/rrdbotd.pid} + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${name}" + start-stop-daemon --start --quiet \ + --pidfile "$pidfile" \ + --chuid ${rrdbotd_user:-rrdbotd}:${rrdbotd_group:-rrdbotd} \ + --exec ${daemon} -- ${rrdbotd_opts} -p "$pidfile" + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile "$pidfile" \ + --exec ${daemon} + eend $? +} + -- cgit v1.2.3