From 493a71d9d9e64de86206dfa3021a9fa2588ea3fb Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 31 Aug 2006 19:39:10 +0000 Subject: rdiff-backup update git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@109 370017ae-e619-0410-ac65-c121f96126d4 --- rdiff-backup/rdiff-backup.SlackBuild | 32 ++++++++++++++++++++++++++++++++ rdiff-backup/rdiff-backup.build | 15 ++++++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100755 rdiff-backup/rdiff-backup.SlackBuild 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 -- cgit v1.2.3