BUILD=${BUILD:=1rha}
SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
tarflag="z"
fi
+SRC_DIR="$SRC_DIR/$PACKAGE"
+mkdir -p $SRC_DIR
+
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
rm -f $SRC_DIR/$SRC.asc
wget "$URL" -O "$SRC_DIR/$SRC"
gpg --verify $SRC.asc $SRC || echo WARNING: Could not check signature or WRONG signature found.
-PKG=$TMP/package-openssh
-
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
fi
# Clean target location:
-rm -rf $PKG
+TMP="$TMP/$PACKAGE"
+PKG=$TMP/package-$PACKAGE
+rm -rf $TMP
mkdir -p $PKG
# Prepare the framework and extract the package:
# Create the package itself:
cd $PKG
-makepkg -l y -c n $TMP/openssh-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $REPOS/openssh-$VERSION-$ARCH-$BUILD.tgz
+
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi