diff options
Diffstat (limited to 'librsync')
-rwxr-xr-x | librsync/librsync.SlackBuild | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/librsync/librsync.SlackBuild b/librsync/librsync.SlackBuild index f7fe131e..5c85d6d6 100755 --- a/librsync/librsync.SlackBuild +++ b/librsync/librsync.SlackBuild @@ -20,6 +20,7 @@ VERSION=${VERSION:=0.9.7} BUILD=${BUILD:=1rha} SRC_DIR=${SRC:=$CWD} TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} if [ "$ARCH" == "x86_64" ]; then LIBDIR=/usr/lib64 @@ -39,14 +40,17 @@ else tarflag="z" fi +SRC_DIR="$SRC_DIR/$PACKAGE" +mkdir -p $SRC_DIR + if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then wget "$URL" -O "$SRC_DIR/$SRC" fi +TMP="$TMP/$PACKAGE" +rm -rf $TMP +mkdir -p $TMP cd $TMP -rm -rf package-$PACKAGE -mkdir package-$PACKAGE -cd package-$PACKAGE tar xvf$tarflag $SRC_DIR/$SRC cd $PACKAGE-$VERSION @@ -94,5 +98,9 @@ done echo 'chroot . /sbin/ldconfig' > install/doinst.sh -makepkg -c y -l y $TMP/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi |