postinst is in fontconfig-config 2.9.0-7.1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
# Remove old ucf stuff
rm -rf /var/lib/fontconfig
CONFAVAIL=/etc/fonts/conf.avail
CONFDIR=/etc/fonts/conf.d
# Remove old defoma stuff
if [ -x "`which defoma-app 2>/dev/null`" ]; then
defoma-app purge fontconfig >/dev/null || true
fi
DEFOMA=/var/lib/defoma/fontconfig.d/
if [ -d $DEFOMA ]; then
rm -f $DEFOMA/fonts.conf
rm -f $DEFOMA/id-cache
rmdir $DEFOMA
fi
rm -f /etc/defoma/fontconfig.subst-rule
db_get fontconfig/hinting_type
hinting_type="$RET"
unhinted="10-unhinted.conf"
autohint="10-autohint.conf"
if [ -h $CONFDIR/$unhinted ]; then
rm $CONFDIR/$unhinted
fi
if [ -h $CONFDIR/$autohint ]; then
rm $CONFDIR/$autohint
fi
case "$hinting_type" in
"Native")
;;
"Autohinter")
ln -s $CONFAVAIL/$autohint $CONFDIR/$autohint
;;
"None")
ln -s $CONFAVAIL/$unhinted $CONFDIR/$unhinted
;;
esac
db_get fontconfig/subpixel_rendering
subpixel_rendering="$RET"
subpixel="10-sub-pixel-rgb.conf"
no_subpixel="10-no-sub-pixel.conf"
if [ -h $CONFDIR/$subpixel ]; then
rm $CONFDIR/$subpixel
fi
if [ -h $CONFDIR/$no_subpixel ]; then
rm $CONFDIR/$no_subpixel
fi
case "$subpixel_rendering" in
"Automatic")
;;
"Always")
ln -s $CONFAVAIL/$subpixel $CONFDIR/$subpixel
;;
"Never")
ln -s $CONFAVAIL/$no_subpixel $CONFDIR/$no_subpixel
;;
esac
db_get fontconfig/enable_bitmaps
enable_bitmaps="$RET"
yes_bitmaps="70-yes-bitmaps.conf"
no_bitmaps="70-no-bitmaps.conf"
if [ -h $CONFDIR/$yes_bitmaps ]; then
rm $CONFDIR/$yes_bitmaps
fi
if [ -h $CONFDIR/$no_bitmaps ]; then
rm $CONFDIR/$no_bitmaps
fi
case "$enable_bitmaps" in
"true")
ln -s $CONFAVAIL/$yes_bitmaps $CONFDIR/$yes_bitmaps
;;
*)
ln -s $CONFAVAIL/$no_bitmaps $CONFDIR/$no_bitmaps
;;
esac
# Create /usr/local/share/fonts
LOCALDIR=/usr/local/share/fonts
if [ ! -d $LOCALDIR ]; then
if mkdir $LOCALDIR 2>/dev/null ; then
chmod 2775 $LOCALDIR
chown root:staff $LOCALDIR
fi
fi
|