aboutsummaryrefslogtreecommitdiff
path: root/rssh
diff options
context:
space:
mode:
Diffstat (limited to 'rssh')
-rwxr-xr-xrssh/rssh-chroot.SlackBuild55
-rwxr-xr-xrssh/rssh.SlackBuild50
2 files changed, 42 insertions, 63 deletions
diff --git a/rssh/rssh-chroot.SlackBuild b/rssh/rssh-chroot.SlackBuild
index b050e697..970f1ff5 100755
--- a/rssh/rssh-chroot.SlackBuild
+++ b/rssh/rssh-chroot.SlackBuild
@@ -14,15 +14,13 @@ Please consider to run this script with the following things installed:
Hit ENTER to continue, Ctrl-C to abort.
EOCAT
-read garbage
-
-# default settings
-PRGNAM="rssh-chroot"
-PACKAGE="$PRGNAM"
-_VERSION="2.3.2"
-_ARCH="i386"
-_BUILD="2rha"
-_TMP="/tmp"
+if [ "$INTERACT" != "no" ]; then
+ echo "Hit ENTER do continue, Crtl-C to abort"
+ read crap
+else
+ echo sleeping 3 seconds...
+ sleep 3
+fi
if [ -f "/etc/slackbuildrc" ]; then
source /etc/slackbuildrc
@@ -32,17 +30,15 @@ if [ -f "~/.slackbuildrc" ]; then
source ~/.slackbuildrc
fi
-if [ -z "$VERSION" ]; then
- VERSION="$_VERSION"
-fi
-
-if [ -z "$ARCH" ]; then
- ARCH="$_ARCH"
-fi
-
-if [ -z "$BUILD" ]; then
- BUILD="$_BUILD"
-fi
+# default settings
+PRGNAM="rssh-chroot"
+PACKAGE="$PRGNAM"
+ARCH=${ARCH:=x86_64}
+VERSION=${VERSION:=2.3.2}
+BUILD=${BUILD:=2rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
@@ -50,19 +46,12 @@ else
LIBDIR=/usr/lib
fi
-if [ -z "$SRC" ]; then
- SRC_DIR="$CWD"
-else
- SRC_DIR="$SRC"
-fi
-
-if [ -z "$TMP" ]; then
- TMP="$_TMP"
-fi
-
# adjust to where your rssh chroot system will be located
CHROOT_BASE="/var/users"
+TMP="$TMP/$PACKAGE"
+rm -rf $TMP
+mkdir -p $TMP
cd $TMP
rm -rf $TMP/package-$PACKAGE
@@ -133,7 +122,9 @@ EOF
chmod 755 ./$CHROOT_BASE/{bin,etc,lib,lib/tls,usr/lib,usr/libexec,usr/bin,usr/doc,dev}
chmod 111 ./$CHROOT_BASE/home
-makepkg -c n $TMP/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c n $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
-rm -rf $TMP/$PACKAGE-$VERSION
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi
diff --git a/rssh/rssh.SlackBuild b/rssh/rssh.SlackBuild
index 627529b7..040b17db 100755
--- a/rssh/rssh.SlackBuild
+++ b/rssh/rssh.SlackBuild
@@ -5,14 +5,6 @@
CWD="`pwd`"
-# default settings
-PRGNAM="rssh"
-PACKAGE="$PRGNAM"
-_VERSION="2.3.2"
-_ARCH="i386"
-_BUILD="2rha"
-_TMP="/tmp"
-
if [ -f "/etc/slackbuildrc" ]; then
source /etc/slackbuildrc
fi
@@ -21,17 +13,15 @@ if [ -f "~/.slackbuildrc" ]; then
source ~/.slackbuildrc
fi
-if [ -z "$VERSION" ]; then
- VERSION="$_VERSION"
-fi
-
-if [ -z "$ARCH" ]; then
- ARCH="$_ARCH"
-fi
-
-if [ -z "$BUILD" ]; then
- BUILD="$_BUILD"
-fi
+# default settings
+PRGNAM="rssh"
+PACKAGE="$PRGNAM"
+ARCH=${ARCH:=x86_64}
+VERSION=${VERSION:=2.3.2}
+BUILD=${BUILD:=2rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
@@ -39,16 +29,6 @@ else
LIBDIR=/usr/lib
fi
-if [ -z "$SRC" ]; then
- SRC_DIR="$CWD"
-else
- SRC_DIR="$SRC"
-fi
-
-if [ -z "$TMP" ]; then
- TMP="$_TMP"
-fi
-
PACKAGE_EXT="gz"
KEY="http://www.pizzashack.org/ddmkey.txt"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
@@ -71,6 +51,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"
wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"
@@ -82,6 +65,9 @@ fi
gpg --verify $SRC.sig $SRC || echo WARNING: Could not check signature or WRONG signature found.
+TMP="$TMP/$PACKAGE"
+rm -rf $TMP
+mkdir -p $TMP
cd $TMP
rm -rf $PACKAGE-$VERSION $PACKAGE-$VERSION-$ARCH-$BUILD.tgz
@@ -136,7 +122,9 @@ cp $CWD/{AUTHORS,CHROOT,COPYING,ChangeLog,INSTALL,LICENSE,NEWS,README,SECURITY,T
# install script
echo '( if [ ! -f "etc/rssh.conf" ]; then mv etc/rssh.conf.new etc/rssh.conf; fi )' > install/doinst.sh
-makepkg -c y $TMP/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
-rm -rf $TMP/$PACKAGE-$VERSION
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi