diff options
Diffstat (limited to 'academic/muscle/muscle.SlackBuild')
-rw-r--r-- | academic/muscle/muscle.SlackBuild | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/academic/muscle/muscle.SlackBuild b/academic/muscle/muscle.SlackBuild index 9e69c5b702..a0e6ea735b 100644 --- a/academic/muscle/muscle.SlackBuild +++ b/academic/muscle/muscle.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for muscle -# Copyright 2011-2019 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 @@ -22,10 +22,15 @@ # 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=muscle VERSION=${VERSION:-3.8.1551} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +MANUAL=muscle_userguide3.8.pdf if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +40,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} @@ -63,6 +75,7 @@ rm -rf ${PRGNAM}-${VERSION} mkdir -p ${PRGNAM}-${VERSION} cd ${PRGNAM}-${VERSION} tar xvf $CWD/${PRGNAM}_src_${VERSION}.tar.gz +tar xvf $CWD/stable.tar.gz chown -R root:root . find -L . \ @@ -78,16 +91,25 @@ CFLAGS="$SLKCFLAGS" \ make install -D -m755 $PRGNAM $PKG/usr/bin/$PRGNAM +install -D -m755 stable.py $PKG/usr/bin/$PRGNAM-stable.py + +# Thanks to Debian for the man page +mkdir -p $PKG/usr/man/man1 +cp $CWD/$PRGNAM.1 $PKG/usr/man/man1/$PRGNAM.1 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 +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/$MANUAL > $PKG/usr/doc/$PRGNAM-$VERSION/$MANUAL cat $CWD/References > $PKG/usr/doc/$PRGNAM-$VERSION/References 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 |