summaryrefslogtreecommitdiffstats
path: root/libraries/p4api/p4api.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/p4api/p4api.SlackBuild')
-rw-r--r--libraries/p4api/p4api.SlackBuild24
1 files changed, 19 insertions, 5 deletions
diff --git a/libraries/p4api/p4api.SlackBuild b/libraries/p4api/p4api.SlackBuild
index 2db9d249d3..30dba68f7b 100644
--- a/libraries/p4api/p4api.SlackBuild
+++ b/libraries/p4api/p4api.SlackBuild
@@ -1,12 +1,19 @@
-#!/bin/sh
+#!/bin/bash
# p4api SlackBuild, R. Bailey <GooseYArd@gmail.com>
-LOCALVER=`tar tf p4api.tgz 2> /dev/null | head -1 | cut -d- -f 2 | cut -d/ -f1`
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=p4api
-VERSION=${VERSION:-$LOCALVER}
+VERSION=${VERSION:-2010.1.260003}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+###sbolint off (because VERSION is being redefined)
+LOCALVER=`tar tf p4api.tgz 2> /dev/null | head -1 | cut -d- -f 2 | cut -d/ -f1`
+VERSION=${LOCALVER:-$VERSION}
+###sbolint on
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -16,7 +23,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,4 +83,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE