aboutsummaryrefslogtreecommitdiff
path: root/duplicity
diff options
context:
space:
mode:
Diffstat (limited to 'duplicity')
-rwxr-xr-xduplicity/duplicity.SlackBuild32
-rwxr-xr-xduplicity/duplicity.build17
2 files changed, 46 insertions, 3 deletions
diff --git a/duplicity/duplicity.SlackBuild b/duplicity/duplicity.SlackBuild
new file mode 100755
index 00000000..9ad2eb2b
--- /dev/null
+++ b/duplicity/duplicity.SlackBuild
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# SlackBuild script to call duplicity.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="duplicity"
+VERSION=${VERSION:=0.4.2}
+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/duplicity/duplicity.build b/duplicity/duplicity.build
index 71e7aef0..d29cc087 100755
--- a/duplicity/duplicity.build
+++ b/duplicity/duplicity.build
@@ -35,6 +35,12 @@ PACKAGE_EXT="gz"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://savannah.nongnu.org/download/duplicity/$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,14 @@ 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
+
+cd $TMP
+
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION