aboutsummaryrefslogtreecommitdiffstats
path: root/testing/collectd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-20 09:53:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-20 09:54:13 +0000
commit5c26937f96946360ecb19a6db1093c508e4df980 (patch)
treea19bd9b0547c060d4c5524f36e0ba7d3fe82c996 /testing/collectd
parent069a0c702da91fe92e64003b833dac51a80e6f86 (diff)
downloadaports-5c26937f96946360ecb19a6db1093c508e4df980.tar.bz2
aports-5c26937f96946360ecb19a6db1093c508e4df980.tar.xz
testing/collectd: new aport
The system statistics collection daemon http://collectd.org still needs init.d script fixes #245
Diffstat (limited to 'testing/collectd')
-rw-r--r--testing/collectd/APKBUILD79
1 files changed, 79 insertions, 0 deletions
diff --git a/testing/collectd/APKBUILD b/testing/collectd/APKBUILD
new file mode 100644
index 0000000000..e145a79fd8
--- /dev/null
+++ b/testing/collectd/APKBUILD
@@ -0,0 +1,79 @@
+# Contributor:
+# Maintainer:
+pkgname=collectd
+pkgver=4.9.1
+pkgrel=0
+pkgdesc="The system statistics collection daemon"
+url="http://collectd.org"
+license="GPL"
+depends=
+makedepends="pkgconfig curl-dev net-snmp-dev postgresql-dev perl-dev
+ libgcrypt-dev mysql-dev zlib-dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc $pkgname-perl $pkgname-snmp $pkgname-curl
+ $pkgname-write_http $pkgname-nginx $pkgname-apache $pkgname-postgresql
+ $pkgname-mysql $pkgname-network"
+
+source="http://collectd.org/files/collectd-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+
+ # we need -lm
+ sed -i -e 's/^collectd_LDADD = \(.*\)/collectd_LDADD = -lm \1/' \
+ -e 's/^collectd_nagios_LDADD = \(.*\)/collectd_nagios_LDADD = -lm \1/' src/Makefile.in
+
+ # disable -Werror
+ sed -i -e 's/-Werror//' src/owniptc/Makefile.in
+
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ find "$pkgdir" -name perllocal.pod -delete
+ # remove the 2 lines below (and this) if there is no init.d script
+ # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+perl() {
+ pkgdesc="perl bindings to collectd"
+ depends="perl"
+ install -d "$subpkgdir"/usr/lib/ "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/lib/perl* "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/share/perl* "$subpkgdir"/usr/share/
+}
+
+_plugin() {
+ local mod=$1
+ local desc=${2:-$mod}
+ pkgdesc="$desc pluin for collectd"
+ depends="collectd"
+ install -d "$subpkgdir"/usr/lib/collectd
+ mv "$pkgdir"/usr/lib/collectd/$mod.so "$subpkgdir"/usr/lib/collectd/
+}
+
+snmp() { _plugin snmp; }
+curl() { _plugin curl; }
+write_http() { _plugin write_http; }
+nginx() { _plugin nginx; }
+apache() { _plugin apache; }
+postgresql() { _plugin postgresql; }
+mysql() { _plugin mysql; }
+network() { _plugin network; }
+
+md5sums="5753496651c8c84afaea1fe290876bfc collectd-4.9.1.tar.bz2"