From aab102a28a28d58a879ef263e3263d4c7ad03650 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 6 Mar 2023 14:31:24 -0500 Subject: system/univga-font: Add douninst.sh. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- system/univga-font/README | 3 +++ system/univga-font/douninst.sh | 23 +++++++++++++++++++++++ system/univga-font/slack-desc | 2 +- system/univga-font/univga-font.SlackBuild | 11 ++++++++++- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 system/univga-font/douninst.sh (limited to 'system/univga-font') diff --git a/system/univga-font/README b/system/univga-font/README index 10e0670927..a5e814d8e5 100644 --- a/system/univga-font/README +++ b/system/univga-font/README @@ -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. diff --git a/system/univga-font/douninst.sh b/system/univga-font/douninst.sh new file mode 100644 index 0000000000..6d7d53ac0a --- /dev/null +++ b/system/univga-font/douninst.sh @@ -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 diff --git a/system/univga-font/slack-desc b/system/univga-font/slack-desc index 6ec95c65cf..67c4cf124f 100644 --- a/system/univga-font/slack-desc +++ b/system/univga-font/slack-desc @@ -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@ diff --git a/system/univga-font/univga-font.SlackBuild b/system/univga-font/univga-font.SlackBuild index 3b9272e57f..dffa83b51b 100644 --- a/system/univga-font/univga-font.SlackBuild +++ b/system/univga-font/univga-font.SlackBuild @@ -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 -- cgit v1.2.3