diff options
Diffstat (limited to 'academic/spidey/spidey.SlackBuild')
-rw-r--r-- | academic/spidey/spidey.SlackBuild | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/academic/spidey/spidey.SlackBuild b/academic/spidey/spidey.SlackBuild index e9ea109df7..09928e95bb 100644 --- a/academic/spidey/spidey.SlackBuild +++ b/academic/spidey/spidey.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2011-2016 Petar Petrov slackalaxy@gmail.com +# Copyright 2011-2021 Petar Petrov slackalaxy@gmail.com # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,30 +20,38 @@ # 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=spidey VERSION=${VERSION:-20060601} # Keep the date of the 32bit binary as version. BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i386 ;; - arm*) ARCH=arm ;; + i?86) ARCH=i586 ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - - -if [ "$ARCH" != "i386" ] && [ "$ARCH" != "x86_64" ]; then +if ! [[ $ARCH =~ i?86 ]] && ! [ "$ARCH" = "x86_64" ]; then printf "\n\n$ARCH is not supported... \n" exit 1 fi +# 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} + # Determine the source arch. Many thanks to the Ugene project for the # 64bit executable! if [ "$ARCH" = "x86_64" ]; then @@ -63,7 +71,7 @@ cd $PRGNAM-$VERSION gunzip -c $CWD/$PRGNAM.linux${SRCARCH}.gz > spidey -install -D -m755 spidey $PKG/usr/bin/spidey +install -D -m 755 spidey $PKG/usr/bin/spidey mkdir -p $PKG/usr/man/man1 cp $CWD/$PRGNAM.1 $PKG/usr/man/man1/$PRGNAM.1 @@ -81,4 +89,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 |