summaryrefslogtreecommitdiffstats
path: root/system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild')
-rw-r--r--system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild b/system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild
index 315b37cdaf..1d343a7bca 100644
--- a/system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild
+++ b/system/unigine-heaven-benchmark/unigine-heaven-benchmark.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for unigine-heaven-benchmark
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=unigine-heaven-benchmark
VERSION=${VERSION:-4.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=Unigine_Heaven
@@ -37,7 +40,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}
@@ -73,10 +83,10 @@ find -L . \
# copy excutable
mkdir -p $PKG/usr/bin
-cp $PKG/opt/$PRGNAM/heaven $PKG/usr/bin
+cp $PKG/opt/$PRGNAM/heaven $PKG/usr/bin/unigine-heaven-benchmark
# fix excutable
-sed -i 's,./bin,/opt/unigine-heaven-benchmark/bin,g' $PKG/usr/bin/heaven
+sed -i 's,cd ./bin,cd /opt/unigine-heaven-benchmark/bin,g' $PKG/usr/bin/unigine-heaven-benchmark
#add application launcher
mkdir -p $PKG/usr/share/applications
@@ -91,4 +101,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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