summaryrefslogtreecommitdiff
path: root/system/tinyterm/tinyterm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/tinyterm/tinyterm.SlackBuild')
-rw-r--r--system/tinyterm/tinyterm.SlackBuild35
1 files changed, 21 insertions, 14 deletions
diff --git a/system/tinyterm/tinyterm.SlackBuild b/system/tinyterm/tinyterm.SlackBuild
index 606b51785d..0abd5e9dbb 100644
--- a/system/tinyterm/tinyterm.SlackBuild
+++ b/system/tinyterm/tinyterm.SlackBuild
@@ -2,7 +2,10 @@
# Slackware build script for tinyterm
-# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# Originally written by:
+# Ryan P.C. McQuen | Everett, WA | (email removed)
+
+# Now maintained by B. Watson (yalhcru@gmail.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,14 +25,22 @@
# with this program (most likely, a file named COPYING). If not, see
# <http://www.gnu.org/licenses/>.
+# 20170308 bkw:
+# - take over maintenance
+# - cosmetics in slack-desc and README
+# - i486 => i586
+# - use long-form github URL
+# - allow custom config.h
+# - BUILD=2
+
PRGNAM=tinyterm
VERSION=${VERSION:-0.5.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,8 +53,8 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING README.md"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,11 +73,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-if [ -e $CWD/$VERSION.tar.gz ]; then
- tar xvf $CWD/$VERSION.tar.gz
-else
- tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-fi
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -75,15 +82,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" make && \
+[ -e "$CWD/config.h" ] && cp "$CWD/config.h" config.h
+
+CFLAGS="$SLKCFLAGS" make
+strip $PRGNAM
make install \
PREFIX=/usr \
MANPREFIX=/usr/man \
DESTDIR=$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
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild