aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 19:39:10 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 19:39:10 +0000
commit493a71d9d9e64de86206dfa3021a9fa2588ea3fb (patch)
treedf9e5f722c6368eade2eee414271bcb43d5c25cb
parent3c204ec70795760484734bf5e51e52c6e0b6ae07 (diff)
downloadslackbuilds-493a71d9d9e64de86206dfa3021a9fa2588ea3fb.tar.gz
slackbuilds-493a71d9d9e64de86206dfa3021a9fa2588ea3fb.tar.bz2
rdiff-backup update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@109 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-xrdiff-backup/rdiff-backup.SlackBuild32
-rwxr-xr-xrdiff-backup/rdiff-backup.build15
2 files changed, 44 insertions, 3 deletions
diff --git a/rdiff-backup/rdiff-backup.SlackBuild b/rdiff-backup/rdiff-backup.SlackBuild
new file mode 100755
index 00000000..f5a64a3c
--- /dev/null
+++ b/rdiff-backup/rdiff-backup.SlackBuild
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# SlackBuild script to call rdiff.build with correct settings
+#
+
+CWD="`pwd`"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+# default settings
+PACKAGE="rdiff-backup"
+VERSION=${VERSION:=1.0.4}
+ARCH=${ARCH:=i386}
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
+
+rm -rf $TMP/$PACKAGE
+mkdir -p $SRC_DIR/$PACKAGE $TMP/$PACKAGE $REPOS
+
+slacktrack -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$PACKAGE.build"
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP/$PACKAGE
+fi
diff --git a/rdiff-backup/rdiff-backup.build b/rdiff-backup/rdiff-backup.build
index c2364e56..b00ada46 100755
--- a/rdiff-backup/rdiff-backup.build
+++ b/rdiff-backup/rdiff-backup.build
@@ -35,6 +35,12 @@ PACKAGE_EXT="gz"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://savannah.nongnu.org/download/rdiff-backup/$SRC"
+SRC_DIR="$SRC_DIR/$PACKAGE"
+
+if [ ! -d "$SRC_DIR" ]; then
+ mkdir -p $SRC_DIR
+fi
+
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
wget "$URL" -O "$SRC_DIR/$SRC"
fi
@@ -45,9 +51,12 @@ else
tarflag="z"
fi
-rm -rf $TMP/package-$PACKAGE
-mkdir $TMP/package-$PACKAGE
-cd $TMP/package-$PACKAGE
+TMP="$TMP/$PACKAGE"
+
+if [ ! -d "$TMP" ]; then
+ mkdir -p $TMP
+fi
+
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION