diff options
Diffstat (limited to 'academic/cistrome-MACS/cistrome-MACS.SlackBuild')
-rw-r--r-- | academic/cistrome-MACS/cistrome-MACS.SlackBuild | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/academic/cistrome-MACS/cistrome-MACS.SlackBuild b/academic/cistrome-MACS/cistrome-MACS.SlackBuild index ad93aefcdf..98f279db3c 100644 --- a/academic/cistrome-MACS/cistrome-MACS.SlackBuild +++ b/academic/cistrome-MACS/cistrome-MACS.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for cistrome-MACS -# Copyright 2013-2020 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,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=cistrome-MACS VERSION=${VERSION:-1.4.2} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=MACS SRCVER=1.4.2-1 @@ -38,7 +41,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} @@ -57,13 +67,20 @@ else LIBDIRSUFFIX="" fi +# 20220222 bkw: depending on what client was used to download the file, +# it may have CGI parameters in the filename. +TARBALL=$CWD/${SRCNAM}-$SRCVER.tar.gz +if [ ! -e $TARBALL ]; then + TARBALL="$( /bin/ls $TARBALL\?* | head -1 )" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz +tar xvf $TARBALL cd $SRCNAM-$VERSION chown -R root:root . find -L . \ @@ -92,4 +109,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 |