diff options
Diffstat (limited to 'gd/gd.SlackBuild')
-rwxr-xr-x | gd/gd.SlackBuild | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gd/gd.SlackBuild b/gd/gd.SlackBuild index 60455c97..09a6b03d 100755 --- a/gd/gd.SlackBuild +++ b/gd/gd.SlackBuild @@ -20,6 +20,7 @@ VERSION=${VERSION:=2.0.33} BUILD=${BUILD:=1rha} SRC_DIR=${SRC:=$CWD} TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} if [ "$ARCH" == "x86_64" ]; then LIBDIR=/usr/lib64 @@ -39,14 +40,17 @@ 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" fi +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 @@ -93,5 +97,9 @@ for file in COPYING INSTALL README-JPEG.TXT README.TXT; do cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ done -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 |