ada2c72a12
PR: 35833 Submitted by: Chia-Hsing Yu <b7506061@csie.ntu.edu.tw> Approved by: maintainer timeout
50 lines
1.0 KiB
Bash
50 lines
1.0 KiB
Bash
#!/bin/sh
|
|
|
|
if [ "$2" = "PRE-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
PKGNAME=$1
|
|
PREFIX=${PKG_PREFIX}
|
|
TTFM=${PREFIX}/bin/ttfm.sh
|
|
|
|
FONTDIR=${PREFIX}/share/fonts/TrueType
|
|
FONTS="bkai00mp.ttf bsmi00lp.ttf gbsn00lp.ttf gkai00mp.ttf"
|
|
DEFAULTMING="bsmi00lp.ttf gbsn00lp.ttf"
|
|
DEFAULTKAI="bkai00mp.ttf gkai00mp.ttf"
|
|
|
|
if [ ! -x $TTFM ]; then
|
|
echo "$TTFM not found!"
|
|
exit 1
|
|
fi
|
|
|
|
rm -f $FONTDIR/$PKGNAME
|
|
|
|
if [ "X$WANT_GS" != "X" ]; then
|
|
for f in $FONTS; do
|
|
$TTFM --add gscjk $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTMING; do
|
|
$TTFM --setdefault gscjk $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTKAI; do
|
|
$TTFM --setdefault_kai gscjk $FONTDIR/$f
|
|
done
|
|
echo "gscjk" >> $FONTDIR/$PKGNAME
|
|
fi
|
|
|
|
if [ "X$WITHOUT_X" = "X" ]; then
|
|
for f in $FONTS; do
|
|
$TTFM --add xttfm $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTMING; do
|
|
$TTFM --setdefault xttfm $FONTDIR/$f
|
|
done
|
|
for f in $DEFAULTKAI; do
|
|
$TTFM --setdefault_kai xttfm $FONTDIR/$f
|
|
done
|
|
echo "xttfm" >> $FONTDIR/$PKGNAME
|
|
fi
|
|
|
|
exit 0
|