aboutsummaryrefslogtreecommitdiff
path: root/mrtg/mrtg.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 17:12:07 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 17:12:07 +0000
commit9119e8a7a3fcdc31f7f77ab2b23ef30a934af0a4 (patch)
treee2a071df4ab852c6f7d77e48c371f7ea3b73b03f /mrtg/mrtg.SlackBuild
parent1302e4571cec85c331b7ea148d0d60c7971b03b6 (diff)
downloadslackbuilds-9119e8a7a3fcdc31f7f77ab2b23ef30a934af0a4.tar.gz
slackbuilds-9119e8a7a3fcdc31f7f77ab2b23ef30a934af0a4.tar.bz2
mrtg update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@84 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'mrtg/mrtg.SlackBuild')
-rwxr-xr-xmrtg/mrtg.SlackBuild19
1 files changed, 14 insertions, 5 deletions
diff --git a/mrtg/mrtg.SlackBuild b/mrtg/mrtg.SlackBuild
index a02a2530..5fdde4ce 100755
--- a/mrtg/mrtg.SlackBuild
+++ b/mrtg/mrtg.SlackBuild
@@ -34,9 +34,8 @@ VERSION=${VERSION:=2.14.3}
BUILD=${BUILD:=1rha}
ARCH=${ARCH:=i486}
SRC_DIR=${SRC:=$CWD}
-
-PKG="$TMP/package-mrtg"
TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
@@ -55,6 +54,9 @@ else
tarflag="z"
fi
+SRC_DIR="$SRC_DIR/$PACKAGE"
+mkdir -p $SRC_DIR
+
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
wget "$URL" -O "$SRC_DIR/$SRC"
fi
@@ -70,10 +72,12 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
-rm -rf $PKG
+TMP="$TMP/$PACKAGE"
+PKG="$TMP/package-mrtg"
+rm -rf $TMP
mkdir -p $PKG
cd $TMP
-rm -rf mrtg-$VERSION
+
tar xvf$tarflag $SRC_DIR/$SRC
cd mrtg-$VERSION
@@ -121,4 +125,9 @@ EOF
mkdir -p $PKG/etc/mrtg
cd $PKG
-makepkg -l y -c n $TMP/mrtg-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $REPOS/mrtg-$VERSION-$ARCH-$BUILD.tgz
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi
+