git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@120
370017ae-e619-0410-ac65-
c121f96126d4
BUILD=${BUILD:=1rha}
TMP=${TMP:=/tmp}
SRC_DIR=${SRC:=$CWD}
+REPOS=${REPOS:=$TMP}
RTOOL="wget"
PACKAGE_EXT="gz"
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
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 {} \;
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