aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xspeex/speex.SlackBuild22
1 files changed, 14 insertions, 8 deletions
diff --git a/speex/speex.SlackBuild b/speex/speex.SlackBuild
index 69359315..86f3ab7c 100755
--- a/speex/speex.SlackBuild
+++ b/speex/speex.SlackBuild
@@ -20,6 +20,7 @@ ARCH=${ARCH:=x86_64}
BUILD=${BUILD:=1rha}
TMP=${TMP:=/tmp}
SRC_DIR=${SRC:=$CWD}
+REPOS=${REPOS:=$TMP}
RTOOL="wget"
PACKAGE_EXT="gz"
@@ -32,6 +33,9 @@ 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
@@ -52,18 +56,16 @@ else
LIBDIR="/usr/lib"
fi
-PKG=$TMP/package-speex
-
-if [ ! -d $TMP ]; then
- mkdir -p $TMP
-fi
-
-rm -rf $PKG
+TMP="$TMP/$PACKAGE"
+PKG=$TMP/package-$PACKAGE
+rm -rf $TMP
mkdir -p $PKG
cd $TMP
+
rm -rf speex-$VERSION
tar xvf$tarflag $SRC_DIR/speex-$VERSION.tar.gz
cd speex-$VERSION
+
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
@@ -137,5 +139,9 @@ if [ -f $CWD/slack-required ]; then
fi
cd $PKG
-makepkg -l y -c n $TMP/speex-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $REPOS/speex-$VERSION-$ARCH-$BUILD.tgz
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi