# HG changeset patch # User Eric Joseph-Alexandre # Date 1269021588 -3600 # Node ID de3424a293fd8cdc0e6938e68c3ed0562d9263d6 # Parent 49290ab7f7d6c8a1a469f0d3d2b3b5b7cde7d39b Add collectd diff -r 49290ab7f7d6 -r de3424a293fd collectd-apache/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd-apache/receipt Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,36 @@ +# SliTaz package receipt. + +PACKAGE="collectd-apache" +VERSION="4.7.0" +CATEGORY="network" +SHORT_DESC="Apache plugin for Collectd" +MAINTAINER="erjo@slitaz.org" +DEPENDS="libcurl apache" +BUILD_DEPENDS="curl-dev" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://collectd.org" +#CONFIG_FILES="/etc/collectd/collectd.conf" +WANTED="collectd" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + --localstatedir=/var \ + --enable-apache \ + --disable-all-plugins \ + --sysconfdir=/etc/collectd \ + $CONFIGURE_ARGS && + make && make DESTDIR=$PWD/_plugins install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/collectd + + cp -a $_pkg/usr/lib/collectd/*.so* $fs/usr/lib/collectd +} + diff -r 49290ab7f7d6 -r de3424a293fd collectd-bind/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd-bind/receipt Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,36 @@ +# SliTaz package receipt. + +PACKAGE="collectd-bind" +VERSION="4.7.0" +CATEGORY="network" +SHORT_DESC="Apache plugin for Collectd" +MAINTAINER="erjo@slitaz.org" +DEPENDS="libcurl libxml2" +BUILD_DEPENDS="libcurl curl-dev libxml2 libxml2-dev" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://collectd.org" +#CONFIG_FILES="/etc/collectd/collectd.conf" +WANTED="collectd" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + --localstatedir=/var \ + --enable-bind \ + --disable-all-plugins \ + --sysconfdir=/etc/collectd \ + $CONFIGURE_ARGS && + make && make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/collectd + + cp -a $_pkg/usr/lib/collectd/bind.so* $fs/usr/lib/collectd +} + diff -r 49290ab7f7d6 -r de3424a293fd collectd-dev/process.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd-dev/process.log Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,13 @@ +executing genpkg_rules +collectd-4.7.0.tazpkg (done) +date 20090530 15:50:27 +package collectd (compile) +no compile_rules +executing genpkg_rules +collectd-4.7.0.tazpkg (done) +executing genpkg_rules +collectd-4.7.0.tazpkg (done) +executing genpkg_rules +collectd-4.7.0.tazpkg (done) +executing genpkg_rules +collectd-4.7.0.tazpkg (done) diff -r 49290ab7f7d6 -r de3424a293fd collectd-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd-dev/receipt Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,25 @@ +# SliTaz package receipt. + +PACKAGE="collectd" +VERSION="4.7.0" +CATEGORY="network" +SHORT_DESC="System Stattistics Collection Daemon" +MAINTAINER="erjo@slitaz.org" +DEPENDS="" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://collectd.org" +WANTED="collectd" +# Rules to config + + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + + cp -a $_pkg/usr/include $fs/usr + cp -a $_pkg/usr/lib/*.*a $fs/usr/lib + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib + +} + diff -r 49290ab7f7d6 -r de3424a293fd collectd/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd/receipt Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,60 @@ +# SliTaz package receipt. + +PACKAGE="collectd" +VERSION="4.7.0" +CATEGORY="network" +SHORT_DESC="System Stattistics Collection Daemon" +MAINTAINER="erjo@slitaz.org" +DEPENDS="rrdtool perl" +BUILD_DEPENDS="slitaz-toolchain rrdtool-dev" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://collectd.org" +WGET_URL="http://collectd.org/files/$TARBALL" +CONFIG_FILES="/etc/collectd/collectd.conf" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr \ + --localstatedir=/var \ + --enable-interface \ + --enable-load \ + --enable-cpu \ + --enable-disk \ + --enable-logfile \ + --enable-syslog \ + --enable-csv\ + --enable-rrdtool \ + --with-librrdtool=/usr/include \ + --disable-all-plugins \ + --sysconfdir=/etc/collectd \ + --localstatedir=/var \ + $CONFIGURE_ARGS && + make && make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + + mkdir -p $fs/usr/lib/collectd \ + $fs/usr/share \ + $fs/etc/init.d + + + cp -a $_pkg/etc $fs/ + cp -a $_pkg/var $fs/ + cp -a $_pkg/usr/share/collectd $fs/usr/share + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/sbin $fs/usr + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib + cp -a $_pkg/usr/lib/collectd/*.so $fs/usr/lib/collectd + cp -a $_pkg/usr/lib/perl5 $fs/usr/lib + + # Add init script and fixes + install -g root -o root -m 0755 stuff/collectd $fs/etc/init.d + chmod 0644 $fs/etc/collectd/* +} + diff -r 49290ab7f7d6 -r de3424a293fd collectd/stuff/collectd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/collectd/stuff/collectd Fri Mar 19 18:59:48 2010 +0100 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/collectd : Start, stop and restart Collectd server on SliTaz, at +# boot time or with the command line. +# +# To start Collectd server at boot time, just put collectd in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=collectd +DESC="Statistics collection daemon" +DAEMON=/usr/sbin/collectd +OPTIONS="" +PIDFILE=/var/run/collectd.pid + +case "$1" in + start) + if active_pidfile $PIDFILE collectd ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if ! active_pidfile $PIDFILE collectd ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart) + if ! active_pidfile $PIDFILE collectd ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0