aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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