aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcourier-imap/courier-imap.SlackBuild2
-rwxr-xr-xduplicity/duplicity.SlackBuild32
-rwxr-xr-xduplicity/duplicity.build17
3 files changed, 47 insertions, 4 deletions
diff --git a/courier-imap/courier-imap.SlackBuild b/courier-imap/courier-imap.SlackBuild
index 5187fa31..15ffccb7 100755
--- a/courier-imap/courier-imap.SlackBuild
+++ b/courier-imap/courier-imap.SlackBuild
@@ -34,8 +34,8 @@ VERSION=${VERSION:=4.1.1}
ARCH=${ARCH:=x86_64}
BUILD=${BUILD:1rha}
TMP=${TMP:=/tmp}
-REPOS=${REPOS:=$TMP}
SRC_DIR=${SRC:=$CWD}
+REPOS=${REPOS:=$TMP}
if [ "`whoami`" == "root" ]; then
echo This script should run as normal user.
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