aboutsummaryrefslogtreecommitdiff
path: root/graphics/psftools/psftools.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-01-12 17:25:31 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-13 07:13:07 +0700
commit3f182011e5da5b41b9bfa0e9c9731a266c859ef2 (patch)
treedfd03b0fc21b8a6bd79d4427e65940cca6dab5f8 /graphics/psftools/psftools.SlackBuild
parent96ddbc4aab55e371589c594e21dce6f41faedcbe (diff)
graphics/psftools: Install sample fonts.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'graphics/psftools/psftools.SlackBuild')
-rw-r--r--graphics/psftools/psftools.SlackBuild36
1 files changed, 35 insertions, 1 deletions
diff --git a/graphics/psftools/psftools.SlackBuild b/graphics/psftools/psftools.SlackBuild
index 072f82c2118c8..baec0d652c851 100644
--- a/graphics/psftools/psftools.SlackBuild
+++ b/graphics/psftools/psftools.SlackBuild
@@ -6,13 +6,17 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20180112 bkw:
+# - BUILD=2
+# - install the fonts that ship with the source, for use with the console.
+
# 20170712 bkw:
# - updated for v1.1.0
# - expand the README since it was a bit too terse
PRGNAM=psftools
VERSION=${VERSION:-1.0.10}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -73,6 +77,33 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
+# 20180112 bkw: install the example fonts that ship with the source.
+psfdir=$PKG/usr/share/kbd/consolefonts
+mkdir -p $psfdir
+
+# I thought to also convert to X fonts, but the results are unusable
+# because the fonts generated by psf2bdf need to be "tidied up" according
+# to the man page... and I don't know (or care enough to find out right
+# now) how to do this in a shell script. X font code left in place,
+# commented out, for reference:
+
+## pcfdir=$PKG/usr/share/fonts/misc
+## mkdir -p $pcfdir
+
+cd Fonts
+for fonttxt in *.txt; do
+ font="$( echo $fonttxt | sed 's,\.txt$,,' )"
+
+ # console font:
+ ../tools/txt2psf $fonttxt > $font.psfu
+ gzip -9c $font.psfu > $psfdir/$font.psfu.gz
+
+ ## # X font:
+ ## ../tools/psf2bdf --fontname=$font --iso10646 $font.psfu > $font.bdf
+ ## bdftopcf $font.bdf | gzip -9c > $pcfdir/$font.pcf.gz
+done
+cd -
+
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
@@ -84,5 +115,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+# X fonts would need this:
+## cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}