diff options
Diffstat (limited to 'academic/ncbi-blast/ncbi-blast.SlackBuild')
-rw-r--r-- | academic/ncbi-blast/ncbi-blast.SlackBuild | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/academic/ncbi-blast/ncbi-blast.SlackBuild b/academic/ncbi-blast/ncbi-blast.SlackBuild index 72015cf2b0..0adf5cbdae 100644 --- a/academic/ncbi-blast/ncbi-blast.SlackBuild +++ b/academic/ncbi-blast/ncbi-blast.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for ncbi-blast -# Copyright 2013-2018 Petar Petrov slackalaxy@gmail.com +# Copyright 2013-2021 Petar Petrov slackalaxy@gmail.com # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,33 +22,42 @@ # 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=ncbi-blast VERSION=${VERSION:-2.2.26} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=blast 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) +if ! [ "$ARCH" = "x86_64" ] && ! [[ $ARCH =~ i?86 ]]; then + printf "\n\n$ARCH is not supported... \n" >/dev/stderr + 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} set -e -if [ "$ARCH" != "i386" ] && [ "$ARCH" != "x86_64" ]; then - printf "\n\n$ARCH is not supported... \n" - exit 1 -fi - # Determine the source arch if [ "$ARCH" = "x86_64" ]; then SRCARCH="x64" @@ -107,4 +116,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 |