wok-undigest rev 1
Add collectd
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Mar 19 18:59:48 2010 +0100 (2010-03-19) |
parents | 49290ab7f7d6 |
children | d3cabeef32fc |
files | collectd-apache/receipt collectd-bind/receipt collectd-dev/process.log collectd-dev/receipt collectd/receipt collectd/stuff/collectd |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/collectd-apache/receipt Fri Mar 19 18:59:48 2010 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="collectd-apache" 1.7 +VERSION="4.7.0" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Apache plugin for Collectd" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="libcurl apache" 1.12 +BUILD_DEPENDS="curl-dev" 1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.14 +WEB_SITE="http://collectd.org" 1.15 +#CONFIG_FILES="/etc/collectd/collectd.conf" 1.16 +WANTED="collectd" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + cd $src 1.22 + ./configure \ 1.23 + --prefix=/usr \ 1.24 + --localstatedir=/var \ 1.25 + --enable-apache \ 1.26 + --disable-all-plugins \ 1.27 + --sysconfdir=/etc/collectd \ 1.28 + $CONFIGURE_ARGS && 1.29 + make && make DESTDIR=$PWD/_plugins install 1.30 +} 1.31 + 1.32 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.33 +genpkg_rules() 1.34 +{ 1.35 + mkdir -p $fs/usr/lib/collectd 1.36 + 1.37 + cp -a $_pkg/usr/lib/collectd/*.so* $fs/usr/lib/collectd 1.38 +} 1.39 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/collectd-bind/receipt Fri Mar 19 18:59:48 2010 +0100 2.3 @@ -0,0 +1,36 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="collectd-bind" 2.7 +VERSION="4.7.0" 2.8 +CATEGORY="network" 2.9 +SHORT_DESC="Apache plugin for Collectd" 2.10 +MAINTAINER="erjo@slitaz.org" 2.11 +DEPENDS="libcurl libxml2" 2.12 +BUILD_DEPENDS="libcurl curl-dev libxml2 libxml2-dev" 2.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.14 +WEB_SITE="http://collectd.org" 2.15 +#CONFIG_FILES="/etc/collectd/collectd.conf" 2.16 +WANTED="collectd" 2.17 + 2.18 +# Rules to configure and make the package. 2.19 +compile_rules() 2.20 +{ 2.21 + cd $src 2.22 + ./configure \ 2.23 + --prefix=/usr \ 2.24 + --localstatedir=/var \ 2.25 + --enable-bind \ 2.26 + --disable-all-plugins \ 2.27 + --sysconfdir=/etc/collectd \ 2.28 + $CONFIGURE_ARGS && 2.29 + make && make DESTDIR=$PWD/_pkg install 2.30 +} 2.31 + 2.32 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.33 +genpkg_rules() 2.34 +{ 2.35 + mkdir -p $fs/usr/lib/collectd 2.36 + 2.37 + cp -a $_pkg/usr/lib/collectd/bind.so* $fs/usr/lib/collectd 2.38 +} 2.39 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/collectd-dev/process.log Fri Mar 19 18:59:48 2010 +0100 3.3 @@ -0,0 +1,13 @@ 3.4 +executing genpkg_rules 3.5 +collectd-4.7.0.tazpkg (done) 3.6 +date 20090530 15:50:27 3.7 +package collectd (compile) 3.8 +no compile_rules 3.9 +executing genpkg_rules 3.10 +collectd-4.7.0.tazpkg (done) 3.11 +executing genpkg_rules 3.12 +collectd-4.7.0.tazpkg (done) 3.13 +executing genpkg_rules 3.14 +collectd-4.7.0.tazpkg (done) 3.15 +executing genpkg_rules 3.16 +collectd-4.7.0.tazpkg (done)
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/collectd-dev/receipt Fri Mar 19 18:59:48 2010 +0100 4.3 @@ -0,0 +1,25 @@ 4.4 +# SliTaz package receipt. 4.5 + 4.6 +PACKAGE="collectd" 4.7 +VERSION="4.7.0" 4.8 +CATEGORY="network" 4.9 +SHORT_DESC="System Stattistics Collection Daemon" 4.10 +MAINTAINER="erjo@slitaz.org" 4.11 +DEPENDS="" 4.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 4.13 +WEB_SITE="http://collectd.org" 4.14 +WANTED="collectd" 4.15 +# Rules to config 4.16 + 4.17 + 4.18 +# Rules to gen a SliTaz package suitable for Tazpkg. 4.19 +genpkg_rules() 4.20 +{ 4.21 + mkdir -p $fs/usr/lib 4.22 + 4.23 + cp -a $_pkg/usr/include $fs/usr 4.24 + cp -a $_pkg/usr/lib/*.*a $fs/usr/lib 4.25 + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib 4.26 + 4.27 +} 4.28 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/collectd/receipt Fri Mar 19 18:59:48 2010 +0100 5.3 @@ -0,0 +1,60 @@ 5.4 +# SliTaz package receipt. 5.5 + 5.6 +PACKAGE="collectd" 5.7 +VERSION="4.7.0" 5.8 +CATEGORY="network" 5.9 +SHORT_DESC="System Stattistics Collection Daemon" 5.10 +MAINTAINER="erjo@slitaz.org" 5.11 +DEPENDS="rrdtool perl" 5.12 +BUILD_DEPENDS="slitaz-toolchain rrdtool-dev" 5.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 5.14 +WEB_SITE="http://collectd.org" 5.15 +WGET_URL="http://collectd.org/files/$TARBALL" 5.16 +CONFIG_FILES="/etc/collectd/collectd.conf" 5.17 + 5.18 +# Rules to configure and make the package. 5.19 +compile_rules() 5.20 +{ 5.21 + cd $src 5.22 + ./configure \ 5.23 + --prefix=/usr \ 5.24 + --localstatedir=/var \ 5.25 + --enable-interface \ 5.26 + --enable-load \ 5.27 + --enable-cpu \ 5.28 + --enable-disk \ 5.29 + --enable-logfile \ 5.30 + --enable-syslog \ 5.31 + --enable-csv\ 5.32 + --enable-rrdtool \ 5.33 + --with-librrdtool=/usr/include \ 5.34 + --disable-all-plugins \ 5.35 + --sysconfdir=/etc/collectd \ 5.36 + --localstatedir=/var \ 5.37 + $CONFIGURE_ARGS && 5.38 + make && make DESTDIR=$PWD/_pkg install 5.39 +} 5.40 + 5.41 +# Rules to gen a SliTaz package suitable for Tazpkg. 5.42 +genpkg_rules() 5.43 +{ 5.44 + 5.45 + mkdir -p $fs/usr/lib/collectd \ 5.46 + $fs/usr/share \ 5.47 + $fs/etc/init.d 5.48 + 5.49 + 5.50 + cp -a $_pkg/etc $fs/ 5.51 + cp -a $_pkg/var $fs/ 5.52 + cp -a $_pkg/usr/share/collectd $fs/usr/share 5.53 + cp -a $_pkg/usr/bin $fs/usr 5.54 + cp -a $_pkg/usr/sbin $fs/usr 5.55 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 5.56 + cp -a $_pkg/usr/lib/collectd/*.so $fs/usr/lib/collectd 5.57 + cp -a $_pkg/usr/lib/perl5 $fs/usr/lib 5.58 + 5.59 + # Add init script and fixes 5.60 + install -g root -o root -m 0755 stuff/collectd $fs/etc/init.d 5.61 + chmod 0644 $fs/etc/collectd/* 5.62 +} 5.63 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/collectd/stuff/collectd Fri Mar 19 18:59:48 2010 +0100 6.3 @@ -0,0 +1,55 @@ 6.4 +#!/bin/sh 6.5 +# /etc/init.d/collectd : Start, stop and restart Collectd server on SliTaz, at 6.6 +# boot time or with the command line. 6.7 +# 6.8 +# To start Collectd server at boot time, just put collectd in the $RUN_DAEMONS 6.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 6.10 +# 6.11 +. /etc/init.d/rc.functions 6.12 +. /etc/daemons.conf 6.13 + 6.14 +NAME=collectd 6.15 +DESC="Statistics collection daemon" 6.16 +DAEMON=/usr/sbin/collectd 6.17 +OPTIONS="" 6.18 +PIDFILE=/var/run/collectd.pid 6.19 + 6.20 +case "$1" in 6.21 + start) 6.22 + if active_pidfile $PIDFILE collectd ; then 6.23 + echo "$NAME already running." 6.24 + exit 1 6.25 + fi 6.26 + echo -n "Starting $DESC: $NAME... " 6.27 + $DAEMON $OPTIONS 6.28 + status 6.29 + ;; 6.30 + stop) 6.31 + if ! active_pidfile $PIDFILE collectd ; then 6.32 + echo "$NAME is not running." 6.33 + exit 1 6.34 + fi 6.35 + echo -n "Stopping $DESC: $NAME... " 6.36 + kill `cat $PIDFILE` 6.37 + status 6.38 + ;; 6.39 + restart) 6.40 + if ! active_pidfile $PIDFILE collectd ; then 6.41 + echo "$NAME is not running." 6.42 + exit 1 6.43 + fi 6.44 + echo -n "Restarting $DESC: $NAME... " 6.45 + kill `cat $PIDFILE` 6.46 + sleep 2 6.47 + $DAEMON $OPTIONS 6.48 + status 6.49 + ;; 6.50 + *) 6.51 + echo "" 6.52 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 6.53 + echo "" 6.54 + exit 1 6.55 + ;; 6.56 +esac 6.57 + 6.58 +exit 0