aboutsummaryrefslogtreecommitdiff
path: root/misc/figlet/figlet.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/figlet/figlet.SlackBuild')
-rw-r--r--misc/figlet/figlet.SlackBuild47
1 files changed, 22 insertions, 25 deletions
diff --git a/misc/figlet/figlet.SlackBuild b/misc/figlet/figlet.SlackBuild
index 35acf1a0e52a..84a1b1f8c9b7 100644
--- a/misc/figlet/figlet.SlackBuild
+++ b/misc/figlet/figlet.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Slackware build script for figlet
-
+
# Copyright 2009 David Woodfall <dave@unrealize.co.uk>
# All rights reserved.
#
@@ -26,7 +26,7 @@
# YOUR DATA IS DESTROYED, YOUR HOUSE BURNS DOWN OR YOUR DOG RUNS OFF.
PRGNAM=figlet
-VERSION=${VERSION:-222}
+VERSION=${VERSION:-2.2.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -43,14 +43,28 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM$VERSION
-tar xvf $CWD/$PRGNAM$VERSION.tar.gz
-cd $PRGNAM$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -58,25 +72,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Need to fix the Makefile
-sed -i 's/local\///g' Makefile
-sed -i '/DEFAULTFONTDIR\ =\ fonts/d' Makefile
-
- # Sed the CFLAGs into the Makefile
-if [ "$ARCH" = "i486" ]; then
- sed -i 's#CFLAGS = -g#CFLAGS=-O2 -march=i486 -mtune=i686#g' Makefile
-elif [ "$ARCH" = "i686" ]; then
- sed -i 's#CFLAGS = -g#CFLAGS=-O2 -march=i686 -mtune=i686#g' Makefile
-elif [ "$ARCH" = "x86_64" ]; then
- sed -i 's#CFLAGS = -g#CFLAGS=-O2 -fPIC#g' Makefile
-fi
-
-make all
-mkdir -p $PKG/usr/bin $PKG/usr/share/figlet $PKG/usr/man/man6
-chmod +x figlist
-cp figlet chkfont figlist $PKG/usr/bin
-cp fonts/*.flf fonts/*.flc $PKG/usr/share/figlet
-cp figlet.6 $PKG/usr/man/man6
+make all CFLAGS="$SLKCFLAGS" prefix=/usr
+make install prefix=/usr DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true