summaryrefslogtreecommitdiffstats
path: root/academic/treeviewx/treeviewx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/treeviewx/treeviewx.SlackBuild')
-rw-r--r--academic/treeviewx/treeviewx.SlackBuild41
1 files changed, 31 insertions, 10 deletions
diff --git a/academic/treeviewx/treeviewx.SlackBuild b/academic/treeviewx/treeviewx.SlackBuild
index f229fe052f..fbb5126bc7 100644
--- a/academic/treeviewx/treeviewx.SlackBuild
+++ b/academic/treeviewx/treeviewx.SlackBuild
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for treeviewx
# Renamed to from "treeview" to "treeviewx" in 2018 to avoid confusion
# with Michael Eisen's TreeView for matrix-like display of expression data.
-# Copyright 2011-2018 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
@@ -25,11 +25,16 @@
# 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=treeviewx
SRCNAM=tv
-VERSION=${VERSION:-0.5.1}
+SRCVER=0.5
+VERSION=${VERSION:-0.5.1_20100723}
+SRCDATE=20100823
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +44,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,9 +75,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/${PRGNAM}_${SRCVER}.1+${SRCDATE}.orig.tar.gz
+cd $SRCNAM-$SRCVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -78,8 +90,6 @@ find -L . \
# Then, of course comment the next line.
sed "s:USE_SVG=1:USE_SVG=0:" -i configure
-patch -p1 < $CWD/cstring.patch
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS -fpermissive" \
./configure \
@@ -93,9 +103,20 @@ CXXFLAGS="$SLKCFLAGS -fpermissive" \
make
make install DESTDIR=$PKG
+# Let's rename the executable
+cd $PKG/usr/bin
+mv $SRCNAM $PRGNAM
+cd -
+
+# Thanks Debian for the man page
+install -D -m644 $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/share/{applications,pixmaps}
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps
@@ -110,4 +131,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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