aboutsummaryrefslogtreecommitdiff
path: root/system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild')
-rw-r--r--system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild47
1 files changed, 28 insertions, 19 deletions
diff --git a/system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild b/system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild
index 0058c3ab0e5e4..0cf5777b79e0f 100644
--- a/system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild
+++ b/system/oldschool-pc-fonts/oldschool-pc-fonts.SlackBuild
@@ -24,6 +24,13 @@
# Now maintained by B. Watson <yalhcru@gmail.com>
+# 20201207 bkw:
+# - Update for v2.2. Enough changes that we can't build the old version with
+# the modified script.
+# - Include all upstream's documentation.
+# - Include OTB fonts, now that they exist.
+# - gzip the .psfu fonts.
+
# 20180108 bkw:
# - Take over maintenance.
# - BUILD=2.
@@ -32,8 +39,8 @@
# - A bit of useful documentation in README_console.txt.
PRGNAM=oldschool-pc-fonts
-VERSION=${VERSION:-1.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch
@@ -43,13 +50,13 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-set -eu
+set -e
-# There are 2 sets of fonts that can be installed: the TrueType ones
-# and console ones converted from the .FON files. These 2 variables control
-# which are installed:
+# There are 2 sets of fonts that can be installed: the TrueType (and
+# OTB, OpenType Bitmap) ones and console ones converted from the .FON
+# files. These 2 variables control which are installed:
-TTF=${TTF:-yes} # By default, TTF is installed
+TTF=${TTF:-yes} # By default, TTF and OTB are installed
CONSOLE=${CONSOLE:-yes} # By default, install console fonts if possible
if [ "$CONSOLE" = "yes" ]; then
@@ -60,8 +67,8 @@ if [ "$CONSOLE" = "yes" ]; then
fi
case "$TTF$CONSOLE" in
- "yesyes") TYPE="TrueType and console fonts" ;;
- "yesno") TYPE="TrueType fonts only" ;;
+ "yesyes") TYPE="TrueType/OTB and console fonts" ;;
+ "yesno") TYPE="TrueType/OTB fonts only" ;;
"noyes") TYPE="console fonts only" ;;
"nono") echo "!!! At least one of TTF or CONSOLE must be set to 'yes'"
exit 1; ;;
@@ -73,26 +80,25 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-unzip $CWD/ultimate_oldschool_pc_font_pack_v${VERSION}.zip -d $PRGNAM-$VERSION
+unzip $CWD/oldschool_pc_font_pack_v${VERSION}_FULL.zip -d $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \+ -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
if [ "$TTF" = "yes" ]; then
- mkdir -p $PKG/usr/share/fonts/TTF
+ mkdir -p $PKG/usr/share/fonts/TTF $PKG/usr/share/fonts/misc
cp -a */*.ttf $PKG/usr/share/fonts/TTF
+ cp -a */*.otb $PKG/usr/share/fonts/misc
fi
if [ "$CONSOLE" = "yes" ]; then
- # The "PS/2thin" fonts don't extract, because fon2fnts insists on using
+ # A few of the fonts don't extract, because fon2fnts insists on using
# the font name embedded in the .FON file as a filename, and these have
# a slash in them. On Windows, no problem, but a slash is a directory
# separator here... but, sed can handle binary files, so we can fix it:
- sed -i 's,PS/2,PS_2,g' */*IBM_PS2thin*.FON
+ sed -i 's,PS/55,PS-55,g' */*IBM_PS-55*.FON
+ sed -i 's,DOS/V,DOS-V,g' */*DOS-V*.FON
mkdir -p $PKG/usr/share/kbd/consolefonts
@@ -108,10 +114,13 @@ if [ "$CONSOLE" = "yes" ]; then
echo "=== $fnt => $psf"
fnt2psf --psf2 --codepage=437 "$fnt" $PKG/usr/share/kbd/consolefonts/$psf
done
+ gzip $PKG/usr/share/kbd/consolefonts/*.psfu
fi
+# Don't include README.NFO, it's the same as README.TXT but with some
+# CP437 characters in the ASCII art logo.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.TXT README.NFO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.TXT docs/*.pdf $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README_console.txt > $PKG/usr/doc/$PRGNAM-$VERSION/README_console.txt
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild