Debian Codegraph @

debian/fonts-ipafont-nonfree-jisx0208.postinst

raw
1 #!/bin/sh
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # font alternatives
8 ALT_GOTHIC_NAME="fonts-japanese-gothic.ttf"
9 ALT_MINCHO_NAME="fonts-japanese-mincho.ttf"
10 GOTHIC_FONT_ENTRY="/usr/share/fonts/truetype/ipafont-nonfree-jisx0208/ipag0208_for_legacy_compatibility.ttf"
11 MINCHO_FONT_ENTRY="/usr/share/fonts/truetype/ipafont-nonfree-jisx0208/ipam0208_for_legacy_compatibility.ttf"
12 FONT_PRIORITY=100
13
14 add_alternate_gothic_font_entry()
15 {
16 update-alternatives --install \
17 /usr/share/fonts/truetype/$ALT_GOTHIC_NAME \
18 $ALT_GOTHIC_NAME \
19 $GOTHIC_FONT_ENTRY \
20 $FONT_PRIORITY
21 }
22
23 add_alternate_mincho_font_entry()
24 {
25 update-alternatives --install \
26 /usr/share/fonts/truetype/$ALT_MINCHO_NAME \
27 $ALT_MINCHO_NAME \
28 $MINCHO_FONT_ENTRY \
29 $FONT_PRIORITY
30 }
31
32
33 # summary of how this script can be called:
34 # * <postinst> `configure' <most-recently-configured-version>
35 # * <old-postinst> `abort-upgrade' <new version>
36 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
37 # <new-version>
38 # * <postinst> `abort-remove'
39 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
40 # <failed-install-package> <version> `removing'
41 # <conflicting-package> <version>
42 # for details, see http://www.debian.org/doc/debian-policy/ or
43 # the debian-policy package
44
45
46 case "$1" in
47 configure)
48 # alternatives
49 add_alternate_gothic_font_entry
50 add_alternate_mincho_font_entry
51
52 ;;
53
54 abort-upgrade|abort-remove|abort-deconfigure)
55 ;;
56
57 *)
58 echo "postinst called with unknown argument \`$1'" >&2
59 exit 1
60 ;;
61 esac
62
63 # dh_installdeb will replace this with shell code automatically
64 # generated by other debhelper scripts.
65
66 #DEBHELPER#
67
68 exit 0
69
70