system/univga-font: Add douninst.sh.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-03-06 14:31:24 -05:00 committed by Willy Sudiarto Raharjo
parent d308647b74
commit aab102a28a
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 37 additions and 2 deletions

View File

@ -28,3 +28,6 @@ some reason need it, you can also install the PCF (portable compiled
X font) version, with PCF=yes in the environment. You can also set
BDF=no, PSF=no, and/or OTB=no, if you want to omit one or more of
these font types. Setting all 4 variables to "no" is an error, though.
This package also includes bdf2psf.pl, which converts X bitmap fonts
to console fonts.

View File

@ -0,0 +1,23 @@
#!/bin/sh
# Update fonts.{dir,scale,alias}
if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then
( cd usr/share/fonts/misc
/usr/bin/mkfontscale .
/usr/bin/mkfontdir .
if [ -e fonts.alias ]; then
grep -v '^univga\>' fonts.alias > fonts.alias.new
mv fonts.alias.new fonts.alias
fi
)
fi
# If X is running...
if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then
/usr/bin/xset fp rehash >/dev/null 2>&1
fi
# Update the X font indexes:
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache -f
fi

View File

@ -10,8 +10,8 @@ univga-font: univga-font (unicode terminal font)
univga-font:
univga-font: UNI-VGA is a Unicode VGA font for X11 and console. It is primarily
univga-font: intended to be the single source of fonts for console and for MS-DOS
univga-font:
univga-font: emulators.
univga-font:
univga-font: Font types included in this package:
univga-font:
univga-font: PSF=@PSF@, BDF=@BDF@, OTB=@OTB@, PCF=@PCF@

View File

@ -8,6 +8,11 @@
# VERSION taken from the datestamp of the tarball.
# 20230306 bkw: BUILD=4
# - add douninst.sh.
# - fix slack-desc formatting.
# - mention bdf2psf.pl in README.
# 20201206 bkw: BUILD=3, added OTB font since -current's pango wants it.
# Also add PCF (disabled by default). Based on a patch from
# Tomasz Bywalec. Update README. Have slack-desc list the
@ -19,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=univga-font
VERSION=${VERSION:-20021031}
BUILD=${BUILD:-3}
BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -111,6 +116,9 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.lsm $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# 20230306 bkw: douninst.sh makes package removal cleaner. it rebuilds
# fonts.{dir|scale} after our fonts get removed, removes the "univga"
# alias, and rebuilds the font cache.
mkdir -p $PKG/install
sed -e "s,@PCF@,$PCF," \
-e "s,@BDF@,$BDF," \
@ -118,6 +126,7 @@ sed -e "s,@PCF@,$PCF," \
-e "s,@OTB@,$OTB," \
$CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/douninst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE