diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/ganglia/README | 16 | ||||
-rw-r--r-- | network/ganglia/doinst.sh | 36 | ||||
-rw-r--r-- | network/ganglia/ganglia.SlackBuild | 92 | ||||
-rw-r--r-- | network/ganglia/ganglia.info | 8 | ||||
-rw-r--r-- | network/ganglia/slack-desc | 19 |
5 files changed, 171 insertions, 0 deletions
diff --git a/network/ganglia/README b/network/ganglia/README new file mode 100644 index 0000000000..1e85dc3c59 --- /dev/null +++ b/network/ganglia/README @@ -0,0 +1,16 @@ +Ganglia is a scalable distributed monitoring system for high-performance +computing systems such as clusters and Grids. It is based on a hierarchical +design targeted at federations of clusters. + +1. This SlackBuild is just going to build Ganglia without 'gmetad', which + collects information from ganglia monitor clients, and writes them to RRD + databases. If you want to enable this, you'll have to enable it with the + OPT variable and 'gmetad' as value, then execute the build script as + follows: OPT=gmetad ./ganglia.SlackBuild + + In order to build gmetad as part of this package, you'll need to have + RRDTool installed. It is available from SlackBuilds.org. + +2. The Ganglia web frontend files will be stored under /var/gweb directory. + You can set WWWPATH to the desired place for your web server. + Example: WWWPATH=/var/www/ganglia ./ganglia.SlackBuild
\ No newline at end of file diff --git a/network/ganglia/doinst.sh b/network/ganglia/doinst.sh new file mode 100644 index 0000000000..2eadc4a110 --- /dev/null +++ b/network/ganglia/doinst.sh @@ -0,0 +1,36 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.gmond.new: +if [ -e etc/rc.d/rc.gmond ]; then + cp -a etc/rc.d/rc.gmond etc/rc.d/rc.gmond.new.incoming + cat etc/rc.d/rc.gmond.new > etc/rc.d/rc.gmond.new.incoming + mv etc/rc.d/rc.gmond.new.incoming etc/rc.d/rc.gmond.new +fi +config etc/rc.d/rc.gmond.new +config etc/gmond.conf.new + +if [ -e etc/gmetad.conf.new ]; then + config etc/gmetad.conf.new +fi + +if [ -e etc/rc.d/rc.gmetad.new ]; then + # Keep same perms on rc.gmetad.new: + if [ -e etc/rc.d/rc.gmetad ]; then + cp -a etc/rc.d/rc.gmetad etc/rc.d/rc.gmetad.new.incoming + cat etc/rc.d/rc.gmetad.new > etc/rc.d/rc.gmetad.new.incoming + mv etc/rc.d/rc.gmetad.new.incoming etc/rc.d/rc.gmetad.new + fi + config etc/rc.d/rc.gmetad.new +fi + diff --git a/network/ganglia/ganglia.SlackBuild b/network/ganglia/ganglia.SlackBuild new file mode 100644 index 0000000000..c395255918 --- /dev/null +++ b/network/ganglia/ganglia.SlackBuild @@ -0,0 +1,92 @@ +#!/bin/sh + +# Slackware build script for ganglia +# Written by Cherife Li <cherife@dotimes.com> +# Modified by Robby Workman <rworkman@slackbuilds.org> + +PRGNAM=ganglia +VERSION=3.0.7 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +WWWPATH=${WWWPATH:-/var/gweb} +DOCUMENTATION="AUTHORS COPYING ChangeLog INSTALL NEWS ganglia.html README" + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +if [ -n "$OPT" ]; then + if [ "$OPT" = 'gmetad' ]; then + OPT='--with-gmetad' + else + unset -v OPT + fi +fi + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-gexeca \ + $OPT + +make +make install DESTDIR=$PKG + +mkdir -p $PKG/etc/rc.d +cat gmond/gmond.init > $PKG/etc/rc.d/rc.gmond.new +./gmond/gmond -t > $PKG/etc/gmond.conf.new + +if [ -n "$OPT" ]; then + cat gmetad/gmetad.init > $PKG/etc/rc.d/rc.gmetad.new + cat gmetad/gmetad.conf > $PKG/etc/gmetad.conf.new +fi + +mkdir -p $PKG/$WWWPATH +mv web/* $PKG/$WWWPATH +( cd $PKG/$WWWPATH ; rm -f AUTHORS COPYING ChangeLog Makefile.am version.php.in ) + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCUMENTATION $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/usr/man/man1 +cp -a mans/*.1 $PKG/usr/man/man1 + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/ganglia/ganglia.info b/network/ganglia/ganglia.info new file mode 100644 index 0000000000..c580ff0845 --- /dev/null +++ b/network/ganglia/ganglia.info @@ -0,0 +1,8 @@ +PRGNAM="ganglia" +VERSION="3.0.7" +HOMEPAGE="http://ganglia.info/" +DOWNLOAD="http://downloads.sourceforge.net/ganglia/ganglia-3.0.7.tar.gz" +MD5SUM="20c210ed33061737e2496fee9243b1f4" +MAINTAINER="Cherife Li" +EMAIL="cherife@dotimes.com" +APPROVED="David Somero,rworkman" diff --git a/network/ganglia/slack-desc b/network/ganglia/slack-desc new file mode 100644 index 0000000000..dc254333a7 --- /dev/null +++ b/network/ganglia/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ganglia: Ganglia (distributed monitoring system) +ganglia: +ganglia: Ganglia is a scalable distributed monitoring system +ganglia: for high-performance computing systems such as +ganglia: clusters and Grids. It is based on a hierarchical +ganglia: design targeted at federations of clusters. +ganglia: +ganglia: Homepage: http://ganglia.info/ +ganglia: +ganglia: +ganglia: |