aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/univga-font/README3
-rw-r--r--system/univga-font/douninst.sh23
-rw-r--r--system/univga-font/slack-desc2
-rw-r--r--system/univga-font/univga-font.SlackBuild11
4 files changed, 37 insertions, 2 deletions
diff --git a/system/univga-font/README b/system/univga-font/README
index 10e0670927840..a5e814d8e59a0 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 0000000000000..6d7d53ac0a6df
--- /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 6ec95c65cf371..67c4cf124f7d3 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 3b9272e57f3de..dffa83b51b51e 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