diff options
Diffstat (limited to 'academic/scilab/scilab.SlackBuild')
-rw-r--r-- | academic/scilab/scilab.SlackBuild | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/academic/scilab/scilab.SlackBuild b/academic/scilab/scilab.SlackBuild index 7737c13fc9..4872772c26 100644 --- a/academic/scilab/scilab.SlackBuild +++ b/academic/scilab/scilab.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for Scilab -# Copyright 2011 Fridrich von Stauffenberg <cancellor2@gmail.com> +# Copyright 2011-2012 Fridrich von Stauffenberg <cancellor2@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ PRGNAM=scilab VERSION=${VERSION:-5.3.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -47,31 +47,20 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then exit 1 fi -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.bin.linux-$ARCH.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . +[ "${USE_SYSTEM_JVM:-no}" = "no" ] && \ + EXCLUDE="" || EXCLUDE="--exclude thirdparty/java" -mkdir -p $PKG/opt/$PRGNAM -mv * $PKG/opt/$PRGNAM +rm -rf $PKG +mkdir -p $OUTPUT $TMP $PKG/opt +tar xvf $CWD/$PRGNAM-$VERSION.bin.linux-$ARCH.tar.gz -C $PKG/opt $EXCLUDE +mv $PKG/opt/$PRGNAM{-$VERSION,} +chown -R root:root $PKG/opt/$PRGNAM -# By default, scilab-cli.desktop executes scilab-cli, -# but scilab-adv-cli.desktop does exactly the same. Why? Who knows. -sed -i '/^Exec/s/-cli/-adv-cli/' \ +sed -i "/^Exec/s/-cli/-adv-cli/" \ $PKG/opt/$PRGNAM/share/applications/$PRGNAM-adv-cli.desktop - -# By default, all *.desktop files are looking for their icons -# somewhere inside /usr. Why? No idea. -sed -i '/^Icon/s/-cli//;/^Icon/s/\/usr/\/opt\/scilab/' \ +sed -i "/^Icon/s/-cli//;/^Icon/s/\/usr/\/opt\/$PRGNAM/" \ $PKG/opt/$PRGNAM/share/applications/*.desktop - -# By default, scilab.pc contains something like this: -# "prefix=/home/scilab/SuperCC/sci_binary/scilab-5.3.3" -# WTF? Don't even ask. -sed -i '/^prefix/s/=.*$/=\/opt\/scilab/' \ +sed -i "/^prefix/s/=.*\$/=\/opt\/$PRGNAM/" \ $PKG/opt/$PRGNAM/lib/pkgconfig/$PRGNAM.pc mkdir -p $PKG/etc/profile.d |