summaryrefslogtreecommitdiffstats
path: root/academic/Gblocks/Gblocks.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/Gblocks/Gblocks.SlackBuild')
-rw-r--r--academic/Gblocks/Gblocks.SlackBuild44
1 files changed, 27 insertions, 17 deletions
diff --git a/academic/Gblocks/Gblocks.SlackBuild b/academic/Gblocks/Gblocks.SlackBuild
index 2a71e48b91..aebb925d1f 100644
--- a/academic/Gblocks/Gblocks.SlackBuild
+++ b/academic/Gblocks/Gblocks.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Gblocks
-# Copyright 2011-2016 Petar Petrov slackalaxy@gmail.com
+# Copyright 2011-2023 Petar Petrov slackalaxy@gmail.com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,31 +22,40 @@
# 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=Gblocks
VERSION=${VERSION:-0.91b}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
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)
+if [[ $ARCH != i?86 ]] && [ "$ARCH" != "x86_64" ]; then
+ printf "\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}
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="64"
@@ -65,15 +74,16 @@ tar xvf $CWD/$TARNAME.tar.Z
cd ${PRGNAM}_${VERSION}
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -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 {} \;
install -D -m755 Gblocks $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/usr/share/$PRGNAM
-cp -a more_alignments/* $PKG/usr/share/$PRGNAM
+cp -a more_alignments nad3.pir paths $PKG/usr/share/$PRGNAM
+chmod 0755 $PKG/usr/share/$PRGNAM/more_alignments
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
@@ -87,4 +97,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