aboutsummaryrefslogtreecommitdiff
path: root/util-vserver/util-vserver.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 21:17:43 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-08-31 21:17:43 +0000
commit739c18b5723c246313dcda1c84f0b6dc4baa326b (patch)
tree622a12f9f7dfb58ed4cb075571cff3dcd1972907 /util-vserver/util-vserver.SlackBuild
parent7623f993d57dccc740961254f1c4231bbd4ce89a (diff)
downloadslackbuilds-739c18b5723c246313dcda1c84f0b6dc4baa326b.tar.gz
slackbuilds-739c18b5723c246313dcda1c84f0b6dc4baa326b.tar.bz2
util-vserver update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@133 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'util-vserver/util-vserver.SlackBuild')
-rwxr-xr-xutil-vserver/util-vserver.SlackBuild55
1 files changed, 21 insertions, 34 deletions
diff --git a/util-vserver/util-vserver.SlackBuild b/util-vserver/util-vserver.SlackBuild
index 1073a3b0..cccdba5e 100755
--- a/util-vserver/util-vserver.SlackBuild
+++ b/util-vserver/util-vserver.SlackBuild
@@ -21,13 +21,6 @@ fi
CWD="`pwd`"
-# default settings
-PACKAGE="util-vserver"
-_VERSION="0.30.210"
-_ARCH="x86_64"
-_BUILD="1rha"
-_TMP="/tmp"
-
if [ -f "/etc/slackbuildrc" ]; then
source /etc/slackbuildrc
fi
@@ -36,17 +29,14 @@ 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
+PACKAGE="util-vserver"
+ARCH=${ARCH:=x86_64}
+VERSION=${VERSION:=0.30.210}
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
@@ -54,16 +44,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
-
RTOOL="wget"
PACKAGE_EXT="bz2"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
@@ -76,6 +56,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"
@@ -83,20 +66,20 @@ fi
gpg --verify $SRC_DIR/$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-$PACKAGE
-mkdir package-$PACKAGE
-cd package-$PACKAGE
tar xvf$tarflag $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-initrddir=/etc/rc.d --localstatedir=/var
make
-make DESTDIR=$TMP/package-$PACKAGE/$PACKAGE install
+make DESTDIR=$TMP/package-$PACKAGE install
CWD="`pwd`"
-cd $TMP/package-$PACKAGE/$PACKAGE
+cd $TMP/package-$PACKAGE
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -137,5 +120,9 @@ done
# install script
echo '( if [ ! -f "etc/vservers.conf" ]; then mv etc/vservers.conf.new etc/vservers.conf; fi )' > 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