diff options
author | Ulrich Schaefer <us@ulischaefer.net> | 2011-01-16 00:26:17 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-01-16 00:26:17 -0600 |
commit | c0b112cf4f1647402ebc02ae878ea66b86376e76 (patch) | |
tree | 97eafecdf101160b4bd14c7a387f8bed61326314 | |
parent | d1f0aa0a79980930d6aea471b546cd90dd81f7c7 (diff) |
network/mrtg: Added (multi router traffic grapher)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r-- | network/mrtg/README | 5 | ||||
-rw-r--r-- | network/mrtg/mrtg.SlackBuild | 85 | ||||
-rw-r--r-- | network/mrtg/mrtg.info | 10 | ||||
-rw-r--r-- | network/mrtg/slack-desc | 19 |
4 files changed, 119 insertions, 0 deletions
diff --git a/network/mrtg/README b/network/mrtg/README new file mode 100644 index 0000000000000..d753ce56a9fe5 --- /dev/null +++ b/network/mrtg/README @@ -0,0 +1,5 @@ +MRTG monitors the traffic load on network links such as routers and +interfaces. It supports SNMP and generates HTML pages with PNG images +showing how much traffic has passed through each interface. MRTG can +also be used to graph everything else like disk space, temperatures, +and so on. diff --git a/network/mrtg/mrtg.SlackBuild b/network/mrtg/mrtg.SlackBuild new file mode 100644 index 0000000000000..e808900843c21 --- /dev/null +++ b/network/mrtg/mrtg.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for mrtg + +# Written by Ulrich schaefer (us@ulischaefer.net) + +PRGNAM=mrtg +VERSION=${VERSION:-2.17.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e # Exit on most errors + +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 . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CPPFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" -exec rm -f {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/doc/mrtg2/* $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share/doc +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/mrtg/mrtg.info b/network/mrtg/mrtg.info new file mode 100644 index 0000000000000..c02fe0f0facb2 --- /dev/null +++ b/network/mrtg/mrtg.info @@ -0,0 +1,10 @@ +PRGNAM="mrtg" +VERSION="2.17.0" +HOMEPAGE="http://oss.oetiker.ch/mrtg/" +DOWNLOAD="http://oss.oetiker.ch/mrtg/pub/mrtg-2.17.0.tar.gz" +MD5SUM="d58bd87835445a38b9b36f50dcc8f6d6" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Ulrich Schaefer" +EMAIL="us@ulischaefer.net" +APPROVED="rworkman" diff --git a/network/mrtg/slack-desc b/network/mrtg/slack-desc new file mode 100644 index 0000000000000..9709bb2546bf0 --- /dev/null +++ b/network/mrtg/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +mrtg: MRTG (multi router traffic grapher) +mrtg: +mrtg: MRTG monitors the traffic load on network links such as routers and +mrtg: interfaces. It supports SNMP and generates HTML pages with PNG images +mrtg: showing how much traffic has passed through each interface. MRTG can +mrtg: also be used to graph everything else like disk space, temperatures, +mrtg: and so on. +mrtg: +mrtg: See Tobi Oetiker's homepage at http://oss.oetiker.ch/mrtg/ +mrtg: +mrtg: |