diff options
Diffstat (limited to 'network/riot-web/riot-web.SlackBuild')
-rw-r--r-- | network/riot-web/riot-web.SlackBuild | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/network/riot-web/riot-web.SlackBuild b/network/riot-web/riot-web.SlackBuild index ae93fffcbfdb7..bf30a41679a29 100644 --- a/network/riot-web/riot-web.SlackBuild +++ b/network/riot-web/riot-web.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for riot-web # Copyright 2018 David O'Shaughnessy +# Copyright 2018 Psychi <psychi2009@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +24,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=riot-web -VERSION=${VERSION:-0.17.3} +PKGNAM=riot +VERSION=${VERSION:-0.17.7} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -32,6 +34,9 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# which browser to launch the app. default as Firefox if not defined. +BROWSER=${BROWSER:-firefox} + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -55,7 +60,8 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $PKG -ar p $CWD/${PRGNAM}_${VERSION}_$DEBARCH.deb data.tar.xz | tar xJv +tar xzvf $CWD/${PKGNAM}-v${VERSION}.tar.gz + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -63,13 +69,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# create soft link for launcher +# Move it. +mkdir -p $PKG/opt +mv ${PKGNAM}-v${VERSION} $PKG/opt/${PRGNAM} + +# Create a script to let the browser to launch the app. mkdir -p $PKG/usr/bin -ln -sf /opt/Riot/$PRGNAM $PKG/usr/bin/$PRGNAM +echo -e "#!/bin/bash +$BROWSER /opt/${PRGNAM}/index.html" \ + > $PKG/usr/bin/riot-web + +chmod a+x $PKG/usr/bin/riot-web mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION -rm -rf $PKG/usr/share/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |