diff options
Diffstat (limited to 'network/cacti/cacti.SlackBuild')
-rw-r--r-- | network/cacti/cacti.SlackBuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/network/cacti/cacti.SlackBuild b/network/cacti/cacti.SlackBuild index 5d7a4f5401b40..f313556788d4c 100644 --- a/network/cacti/cacti.SlackBuild +++ b/network/cacti/cacti.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for cacti: # a network graphing solution using rrdtool -# Copyright 2009-2011 Niels Horn, Rio de Janeiro, RJ, Brazil +# Copyright 2009-2012 Niels Horn, Rio de Janeiro, RJ, Brazil # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,14 +23,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# revision date 2011/10/03 +# revision date 2012/02/17 PRGNAM=cacti -VERSION=${VERSION:-0.8.7h} +VERSION=${VERSION:-0.8.7i_p1} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PATCHLEVEL=$(echo "${VERSION}p" | cut -f2 -dp) +[ "x$PATCHLEVEL" = "x" ] && PATCHLEVEL=0 + # Remove patch-level from $PRGNAM if it exists SRCVERSION=$(echo "${VERSION}_" | cut -f1 -d_) @@ -45,7 +48,7 @@ for i in $(echo $DOCROOT | tr "/" " "); do done # Current PATCHES (empty if none for now) -PATCHES="" +PATCHES="settings_checkbox.patch" CWD=$(pwd) TMP=${TMP:-/tmp/SBo} @@ -63,9 +66,15 @@ chown -R root:root . chmod -R u+w,go+r-w,a-s . # Apply patches from upstream +patchfound=0 for patch in $PATCHES; do - patch -p1 < $CWD/$patch + patch -p1 < $CWD/$patch && let patchfound=$patchfound+1 done +# Test if we processed all patches +if [ $patchfound -ne $PATCHLEVEL ]; then + echo "Incorrect number of patches: level = $PATCHLEVEL / found = $patchfound" + exit 1 +fi # "Install" to $DOCROOT/cacti mkdir -p $PKG/$DOCROOT/$PRGNAM |