diff options
Diffstat (limited to 'academic/pysam/pysam.SlackBuild')
-rw-r--r-- | academic/pysam/pysam.SlackBuild | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/academic/pysam/pysam.SlackBuild b/academic/pysam/pysam.SlackBuild index f5c3d8615e..17d0db3198 100644 --- a/academic/pysam/pysam.SlackBuild +++ b/academic/pysam/pysam.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for pysam -# Copyright 2017 Rob van Nues +# Copyright 2017-2023 Rob van Nues # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,15 +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=pysam -VERSION=${VERSION:-0.15.3} -BUILD=${BUILD:-1} +VERSION=${VERSION:-0.21.0} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} - -#set which python version to install it for -PYTHON2=false -PYTHON3=true +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -40,7 +38,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} @@ -68,22 +73,19 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . + find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + \( -perm 777 -o -perm 775 -o -perm 751 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -#use system htslib instead -export HTSLIB_LIBRARY_DIR=/usr/lib$LIBDIRSUFFIX -export HTSLIB_INCLUDE_DIR=/usr/include +# pysam linked to htslib-1.17; SBo-htslib is at 1.18 -if $PYTHON2; then - python setup.py install --root=$PKG -fi -if $PYTHON3; then - python3 setup.py install --root=$PKG -fi +#the source does not allow 'read' to 'other', which could cause a problem on reloading a Jupyter-notebook +chmod 644 pysam.egg-info/* + +python3 setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -94,8 +96,9 @@ cp -a \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + 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 |