summaryrefslogtreecommitdiffstats
path: root/academic/spidey/spidey.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/spidey/spidey.SlackBuild')
-rw-r--r--academic/spidey/spidey.SlackBuild61
1 files changed, 50 insertions, 11 deletions
diff --git a/academic/spidey/spidey.SlackBuild b/academic/spidey/spidey.SlackBuild
index 443940eb11..5a31c4f26a 100644
--- a/academic/spidey/spidey.SlackBuild
+++ b/academic/spidey/spidey.SlackBuild
@@ -1,25 +1,57 @@
#!/bin/sh
-# Slackware build script for spidey
-# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
-# hereby submitted to the public domain
-
-# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING
-# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
-# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT.
+# Copyright 2011-2015 Petar Petrov, petar.petrov@student.oulu.fi
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=spidey
-VERSION=${VERSION:-20060601}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-20060601} # Keep the date of the 32bit binary as version.
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-ARCH=i386
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i386 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" != "i386" ] && [ "$ARCH" != "x86_64" ]; then
+ printf "\n\n$ARCH is not supported... \n"
+ exit 1
+fi
+
+# Determine the source arch. Many thanks to the Ugene project for the
+# 64bit executable!
+if [ "$ARCH" = "x86_64" ]; then
+ SRCARCH=".64"
+else
+ SRCARCH=""
+fi
+
set -e
rm -rf $PKG
@@ -28,13 +60,20 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
-gunzip -c $CWD/$PRGNAM.linux.gz > spidey
+
+gunzip -c $CWD/$PRGNAM.linux${SRCARCH}.gz > spidey
install -D -m755 spidey $PKG/usr/bin/spidey
+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