misc/font-unscii: 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-07 18:22:11 -05:00 committed by Willy Sudiarto Raharjo
parent 2dfc13cd60
commit aeeb4a2a93
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 41 additions and 10 deletions

View file

@ -1,9 +1,17 @@
# Update fonts.{dir,scale,alias}
if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then
for i in misc TTF OTF; do
( cd usr/share/fonts/misc
if ! grep -q ^unscii- fonts.alias; then
cat <<EOF >> fonts.alias
( cd usr/share/fonts/$i
/usr/bin/mkfontscale .
/usr/bin/mkfontdir .
)
done
fi
# Only include aliases for the bitmap fonts (e.g. xterm -fn unscii-16)
( cd usr/share/fonts/misc
if ! grep -q ^unscii- fonts.alias; then
cat <<EOF >> fonts.alias
unscii-16-full -unscii-unscii-medium-r-normal-full-16-160-75-75-c-80-iso10646-1
unscii-16 -unscii-unscii-medium-r-normal-16-16-160-75-75-c-80-iso10646-1
unscii-8-alt -unscii-unscii-medium-r-normal-alt-8-80-75-75-c-80-iso10646-1
@ -13,12 +21,8 @@ unscii-8-tall -unscii-unscii-medium-r-normal-tall-16-160-75-75-c-80-iso10646-1
unscii-8-thin -unscii-unscii-medium-r-normal-thin-8-80-75-75-c-80-iso10646-1
unscii-8 -unscii-unscii-medium-r-normal-8-8-80-75-75-c-80-iso10646-1
EOF
fi
/usr/bin/mkfontscale .
/usr/bin/mkfontdir .
)
done
fi
fi
)
# If X is running...
if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then

View file

@ -0,0 +1,25 @@
# Update fonts.{dir,scale,alias}
if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then
for i in misc TTF OTF; do
( cd usr/share/fonts/$i
/usr/bin/mkfontscale .
/usr/bin/mkfontdir .
)
done
fi
# Remove aliases.
( cd usr/share/fonts/misc
grep -v ^unscii- fonts.alias > fonts.alias.new
mv fonts.alias.new fonts.alias
)
# 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

@ -6,13 +6,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230307 bkw: BUILD=2, fix doinst.sh, add douninst.sh for cleanup.
# 20210326 bkw: updated for v2.1, reflow README, new homepage/download
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=font-unscii
VERSION=${VERSION:-2.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
@ -58,6 +59,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $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