]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
sudo update
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Thu, 31 Aug 2006 18:38:17 +0000 (18:38 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Thu, 31 Aug 2006 18:38:17 +0000 (18:38 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@103 370017ae-e619-0410-ac65-c121f96126d4

patches/sudo/sudo.SlackBuild

index 9aeb51448fb7cfb78de75a560577473921cc83ac..355b813f83ea6279dab175b5dae45825d8a0c7fc 100755 (executable)
@@ -21,6 +21,7 @@ ARCH=${ARCH:=x86_64}
 BUILD=${BUILD:=1rha}
 SRC_DIR=${SRC:=$CWD}
 TMP=${TMP:=/tmp}
+REPOS=${REPOS:=$TMP}
 
 RTOOL="wget"
 PACKAGE_EXT="gz"
@@ -33,6 +34,9 @@ else
   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.sig
   wget "$URL" -O "$SRC_DIR/$SRC"
@@ -68,13 +72,9 @@ EOGPG
 
 gpg --verify $SRC.sig $SRC || echo WARNING: Could not check signature or WRONG signature found.
 
+TMP="$TMP/$PACKAGE"
 PKG=$TMP/package-sudo
-
-if [ ! -d $TMP ]; then
-  mkdir -p $TMP # location to build the source
-fi
-
-rm -rf $PKG
+rm -rf $TMP
 mkdir -p $PKG
 
 if [ "$ARCH" = "i386" ]; then
@@ -121,5 +121,9 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
 
 # Build the package:
 cd $PKG
-makepkg -l y -c n $TMP/sudo-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $REPOS/sudo-$VERSION-$ARCH-$BUILD.tgz
+
+if [ "$CLEANUP" == "yes" ]; then
+  rm -rf $TMP
+fi