summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-05-13 00:59:55 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:59:55 +0200
commit9a981fcfe5780b39a066d4aad73fdb7bc38d3a5a (patch)
tree0a8623e06e9f418468354bb1282bf1446e611b59
parentc1c07adda66f6ee1324bb5bb80fa17744071df05 (diff)
downloadslackbuilds-9a981fcfe5780b39a066d4aad73fdb7bc38d3a5a.tar.gz
network/cacti: Added to 13.0 repository
-rw-r--r--network/cacti/README25
-rw-r--r--network/cacti/cacti.SlackBuild71
-rw-r--r--network/cacti/cacti.info10
-rw-r--r--network/cacti/doinst.sh15
-rw-r--r--network/cacti/slack-desc19
5 files changed, 140 insertions, 0 deletions
diff --git a/network/cacti/README b/network/cacti/README
new file mode 100644
index 0000000000..344146e40b
--- /dev/null
+++ b/network/cacti/README
@@ -0,0 +1,25 @@
+Cacti is a complete network graphing solution designed to
+harness the power of RRDTool's data storage and graphing funcionality.
+
+Cacti provides a fast poller, advanced graph templating, multiple
+data acquisition methods, and user-management features out of the box.
+
+All of this is wrapped in an intuitive, easy to use interface that
+makes sense for LAN-sized installations up to complex networks with
+hundreds of devices.
+
+This SlackBuild uses the following defaults:
+* DOCROOT=/var/www/htdocs
+* PHPUSER=root
+* PHPGROUP=apache
+
+Change these at build time if preferred:
+# DOCROOT=/your/preferred/directory \
+ PHPUSER=youruser PHPGROUP=yourgroup \
+ ./cacti.SlackBuild
+
+Requires:
+- rrdtool (available on SlackBuilds.org)
+- httpd, php & mysql (as included in Slackware) configured & running
+
+Check the included documentation to setup your MySQL database and users.
diff --git a/network/cacti/cacti.SlackBuild b/network/cacti/cacti.SlackBuild
new file mode 100644
index 0000000000..60d13fdf80
--- /dev/null
+++ b/network/cacti/cacti.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Slackware build script for cacti:
+# a network graphing solution using rrdtool
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2009/10/17
+
+PRGNAM=cacti
+VERSION=0.8.7e
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+DOCROOT=${DOCROOT:-/var/www/htdocs}
+PHPUSER=${PHPUSER:-root}
+PHPGROUP=${PHPGROUP:-apache}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $TMP/$PRGNAM-$VERSION $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# "Install" to $DOCROOT/cacti
+mkdir -p $PKG/$DOCROOT/$PRGNAM
+cp -a \
+ *.php *.pl \
+ include resource lib rra images cli scripts log install \
+ $PKG/$DOCROOT/$PRGNAM/
+chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGNAM
+
+# Move configuration & create symbolic link
+mkdir -p $PKG/etc/$PRGNAM
+mv $PKG/$DOCROOT/$PRGNAM/include/config.php $PKG/etc/$PRGNAM/config.php
+( cd $PKG/$DOCROOT/$PRGNAM/include/
+ ln -s $PKG/etc/$PRGNAM/config.php config.php
+ mv $PKG/etc/$PRGNAM/config.php $PKG/etc/$PRGNAM/config.php.new
+ chmod 600 $PKG/etc/$PRGNAM/config.php.new
+)
+
+# Copy docs & create symbolic link
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE docs/* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mkdir -p $PKG/$DOCROOT/$PRGNAM/docs
+( cd $PKG/$DOCROOT/$PRGNAM/docs
+ ln -s $PKG/usr/doc/$PRGNAM-$VERSION/html html
+)
+
+# Copy post-installation scripts to /usr/share/cacti
+mkdir -p $PKG/usr/share/$PRGNAM
+cp cacti.sql $PKG/usr/share/$PRGNAM
+
+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.${PKGTYPE:-tgz}
diff --git a/network/cacti/cacti.info b/network/cacti/cacti.info
new file mode 100644
index 0000000000..d2c3e23b9a
--- /dev/null
+++ b/network/cacti/cacti.info
@@ -0,0 +1,10 @@
+PRGNAM="cacti"
+VERSION="0.8.7e"
+HOMEPAGE="http://www.cacti.net/"
+DOWNLOAD="http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz"
+MD5SUM="7563a58a57d2c6cc0da28cc341a30969"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="dsomero"
diff --git a/network/cacti/doinst.sh b/network/cacti/doinst.sh
new file mode 100644
index 0000000000..adb1b10ae8
--- /dev/null
+++ b/network/cacti/doinst.sh
@@ -0,0 +1,15 @@
+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...
+}
+
+config etc/cacti/config.php.new
+
diff --git a/network/cacti/slack-desc b/network/cacti/slack-desc
new file mode 100644
index 0000000000..63adbae28e
--- /dev/null
+++ b/network/cacti/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------------------------------------------------------|
+cacti: Cacti (complete network graphing solution)
+cacti:
+cacti: Cacti is a complete network graphing solution designed to harness
+cacti: the power of RRDTool's data storage and graphing funcionality.
+cacti: Cacti provides a fast poller, advanced graph templating, multiple
+cacti: data acquisition methods, and user-management features out of the box.
+cacti: All of this is wrapped in an intuitive, easy to use interface that
+cacti: makes sense for LAN-sized installations up to complex networks with
+cacti: hundreds of devices.
+cacti:
+cacti: Homepage: http://www.cacti.net/