aboutsummaryrefslogtreecommitdiff
path: root/dev/libs/libpth/libpth.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev/libs/libpth/libpth.SlackBuild')
-rwxr-xr-xdev/libs/libpth/libpth.SlackBuild10
1 files changed, 6 insertions, 4 deletions
diff --git a/dev/libs/libpth/libpth.SlackBuild b/dev/libs/libpth/libpth.SlackBuild
index 3aa012e6..06315a7b 100755
--- a/dev/libs/libpth/libpth.SlackBuild
+++ b/dev/libs/libpth/libpth.SlackBuild
@@ -41,9 +41,9 @@ TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
PREFIX=${PREFIX:=/usr}
-PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION"
+PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=--sysconfdir=/etc --infodir=$PREFIX/info --mandir=$PREFIX/man --enable-shared=yes --enable-static=no --enable-pthread=no}
-NUMJOBS=${NUMJOBS:=}
+NUMJOBS=${NUMJOBS:=-j1}
# Set system libraries' path and optmization flags based on $ARCH
LIBDIR="$PREFIX/lib"
@@ -68,13 +68,14 @@ ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
# Clean up any leftovers of previous builds
-rm -rf "$PKG_SRC" 2> /dev/null
+rm -rf "$PKG_WORK" 2> /dev/null
rm -rf "$PKG" 2> /dev/null
# Create directories if necessary
mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
mkdir -p "$PKG" || exit $ERROR_MKDIR
mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
SRC="$SRC_NAME-$SRC_VERSION.tar.gz"
@@ -126,8 +127,9 @@ fi
gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
# Untar
-cd "$TMP"
+cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
cd "$PKG_SRC"
# Fix source files' ownership and permission