Import Debian changes 2.90-7
xfonts-mona (2.90-7) unstable; urgency=low
.
* Update debian/control.
- Bump up Standards-Version to 3.9.3.
- Update version of debhelper to (>= 9).
- Remove dpatch from Build-Depends.
* Update patch format to quilt.
* Fix build with perl 5.12. (Closes: #628362)
- Add patches/fix_build_perl5.12.patch.
* Update debian/rules.
- Change to using dh.
* Update debian/compat to 9.
* Update debian/ttf-mona.prerm and postinst.
- Changte to prefix from ttf- to fonts-.
* Add fonts-mona package.
* Set Priority: extra and Section: oldlibs to ttf-mona.
Nobuhiro Iwamatsu authored 12 years ago
Nobuhiro Iwamatsu committed 3 years ago
0 | xfonts-mona (2.90-7) unstable; urgency=low | |
1 | ||
2 | * Update debian/control. | |
3 | - Bump up Standards-Version to 3.9.3. | |
4 | - Update version of debhelper to (>= 9). | |
5 | - Remove dpatch from Build-Depends. | |
6 | * Update patch format to quilt. | |
7 | * Fix build with perl 5.12. (Closes: #628362) | |
8 | - Add patches/fix_build_perl5.12.patch. | |
9 | * Update debian/rules. | |
10 | - Change to using dh. | |
11 | * Update debian/compat to 9. | |
12 | * Update debian/ttf-mona.prerm and postinst. | |
13 | - Changte to prefix from ttf- to fonts-. | |
14 | * Add fonts-mona package. | |
15 | * Set Priority: extra and Section: oldlibs to ttf-mona. | |
16 | ||
17 | -- Nobuhiro Iwamatsu <iwamatsu@debian.org> Wed, 21 Mar 2012 09:27:05 +0900 | |
18 | ||
0 | 19 | xfonts-mona (2.90-6) unstable; urgency=low |
1 | 20 | |
2 | 21 | * Remove debian/defoma and debian/rules. (Closes: #571026) |
1 | 1 | Section: fonts |
2 | 2 | Priority: optional |
3 | 3 | Maintainer: Nobuhiro Iwamatsu <iwamatsu@debian.org> |
4 | Build-Depends: debhelper (>= 5.0.31), dpatch | |
4 | Build-Depends: debhelper (>= 9) | |
5 | 5 | Build-Depends-Indep: ttf-kochi-gothic, bzip2, xfonts-utils |
6 | Standards-Version: 3.8.4 | |
6 | Standards-Version: 3.9.3 | |
7 | 7 | |
8 | 8 | Package: xfonts-mona |
9 | 9 | Architecture: all |
12 | 12 | These fonts are suitable for some ASCII arts like mona, gikoneko and so on. |
13 | 13 | This package provides BDF (Bitmap Description / Display Format) font. |
14 | 14 | |
15 | Package: ttf-mona | |
15 | Package: fonts-mona | |
16 | 16 | Architecture: all |
17 | 17 | Depends: ${misc:Depends} |
18 | Provides: ttf-japanese-gothic | |
19 | Conflicts: ttf-mona (<< 2.90-7) | |
20 | Replaces: ttf-mona (<< 2.90-7) | |
18 | 21 | Description: Japanese TrueType font for 2ch ASCII art |
19 | 22 | These fonts are suitable for some ASCII arts like mona, gikoneko and so on. |
20 | 23 | This package provides TrueType font. |
24 | ||
25 | Package: ttf-mona | |
26 | Depends: fonts-mona, ${misc:Depends} | |
27 | Architecture: all | |
28 | Priority: extra | |
29 | Section: oldlibs | |
30 | Description: Transitional dummy package | |
31 | This package is a dummy transitional package. It can be safely removed. |
0 | #! /bin/sh | |
1 | set -e | |
2 | ||
3 | # font alternatives | |
4 | ALT_NAME_OLD="ttf-japanese-gothic" | |
5 | ALT_NAME="fonts-japanese-gothic" | |
6 | FONT_ENTRY="/usr/share/fonts/truetype/mona/mona.ttf" | |
7 | FONT_PRIORITY=20 | |
8 | ||
9 | remove_old_alternate_font_entry() | |
10 | { | |
11 | # remove old 'ttf-japanese-mincho' alternatives | |
12 | if [ -f /usr/share/fonts/truetype/$ALT_NAME_OLD ]; then | |
13 | rm -rf /usr/share/fonts/truetype/$ALT_NAME_OLD | |
14 | fi | |
15 | # remove old 'ttf-japanese-mincho.ttf' alternatives | |
16 | if [ -f /usr/share/fonts/truetype/$ALT_NAME_OLD.ttf ]; then | |
17 | update-alternatives --remove $ALT_NAME_OLD.ttf $FONT_ENTRY | |
18 | fi | |
19 | } | |
20 | ||
21 | add_alternate_font_entry() | |
22 | { | |
23 | update-alternatives --install \ | |
24 | /usr/share/fonts/truetype/$ALT_NAME.ttf \ | |
25 | $ALT_NAME.ttf \ | |
26 | $FONT_ENTRY \ | |
27 | $FONT_PRIORITY | |
28 | } | |
29 | ||
30 | case "$1" in | |
31 | configure) | |
32 | # alternatives | |
33 | remove_old_alternate_font_entry | |
34 | add_alternate_font_entry | |
35 | ;; | |
36 | ||
37 | abort-upgrade|abort-remove|abort-deconfigure) | |
38 | ||
39 | ;; | |
40 | ||
41 | *) | |
42 | echo "postinst called with unknown argument \`$1'" >&2 | |
43 | exit 1 | |
44 | ;; | |
45 | esac | |
46 | ||
47 | # dh_installdeb will replace this with shell code automatically | |
48 | # generated by other debhelper scripts. | |
49 | ||
50 | #DEBHELPER# | |
51 | ||
52 | exit 0 |
0 | #!/bin/sh | |
1 | ||
2 | set -e | |
3 | ||
4 | PKG="ttf-mona" | |
5 | PKG_VERSION="2.90-5" | |
6 | ||
7 | rm_conffile() { | |
8 | PKGNAME="$1" | |
9 | CONFFILE="$2" | |
10 | if [ -e "$CONFFILE" ]; then | |
11 | md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" | |
12 | old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" | |
13 | if [ "$md5sum" != "$old_md5sum" ]; then | |
14 | echo "Obsolete conffile $CONFFILE has been modified by you." | |
15 | echo "Saving as $CONFFILE.dpkg-bak ..." | |
16 | mv -f "$CONFFILE" "$CONFFILE".dpkg-bak | |
17 | else | |
18 | echo "Removing obsolete conffile $CONFFILE ..." | |
19 | rm -f "$CONFFILE" | |
20 | fi | |
21 | fi | |
22 | } | |
23 | ||
24 | case "$1" in | |
25 | install|upgrade) | |
26 | if dpkg --compare-versions "$2" lt-nl "$PKG_VERSION"; then | |
27 | FILE="/etc/defoma/hints/${PKG}.hints" | |
28 | if [ -f $FILE ]; then | |
29 | if [ -x /usr/bin/defoma-font ]; then | |
30 | defoma-font purge-all $FILE || true | |
31 | fi | |
32 | fi | |
33 | rm_conffile $PKG $FILE | |
34 | fi | |
35 | esac | |
36 | ||
37 | #DEBHELPER# | |
38 | exit 0 |
0 | #! /bin/sh | |
1 | set -e | |
2 | ||
3 | # font alternatives | |
4 | ALT_NAME_OLD="ttf-japanese-gothic" | |
5 | ALT_NAME="fonts-japanese-gothic" | |
6 | FONT_ENTRY="/usr/share/fonts/truetype/mona/mona.ttf" | |
7 | ||
8 | remove_alternate_font_entry() | |
9 | { | |
10 | update-alternatives --remove $ALT_NAME.ttf $FONT_ENTRY | |
11 | } | |
12 | ||
13 | case "$1" in | |
14 | upgrade|deconfigure) | |
15 | ;; | |
16 | remove) | |
17 | # alternative | |
18 | remove_alternate_font_entry | |
19 | ;; | |
20 | failed-upgrade) | |
21 | ;; | |
22 | *) | |
23 | echo "prerm called with unknown argument \`$1'" >&2 | |
24 | exit 1 | |
25 | ;; | |
26 | esac | |
27 | ||
28 | # dh_installdeb will replace this with shell code automatically | |
29 | # generated by other debhelper scripts. | |
30 | ||
31 | #DEBHELPER# | |
32 | ||
33 | exit 0 |
0 | #! /bin/sh /usr/share/dpatch/dpatch-run | |
1 | ## 01_fix_kochigothic_fonts_path.dpatch by Nobuhiro Iwamatsu <hemamu@t-base.ne.jp> | |
2 | ## | |
3 | ## All lines beginning with `## DP:' are a description of the patch. | |
4 | ## DP: Fix ttfsrc's kochigothic path. | |
5 | ||
6 | @DPATCH@ | |
7 | --- a/ttfsrc/Makefile 2003-09-10 11:54:11.000000000 +0900 | |
8 | +++ b/ttfsrc/Makefile 2006-11-26 14:38:57.000000000 +0900 | |
9 | @@ -33,7 +33,8 @@ | |
10 | ||
11 | # modify this: | |
12 | #BASE_OUTLINE_TTF=/usr/share/fonts/ja/TrueType/kochi-gothic.ttf # for RedHat | |
13 | -BASE_OUTLINE_TTF=/src/kochi-substitute/kochi-gothic-subst.ttf | |
14 | +BASE_OUTLINE_TTF=/usr/share/fonts/truetype/kochi/kochi-gothic-subst.ttf | |
15 | + | |
16 | MONA_OUTLINE_TTF=mona-outline.ttf | |
17 | ||
18 | TTFPACK=$(PERL) $(TTFTOOLS)/ttfpack |
0 | Description: Fix Build with Perl 5.12 | |
1 | Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3509536&group_id=55807&atid=478326 | |
2 | Author: Nobuhiro Iwamatsu <iwamatsu@debian.org> | |
3 | Last-Update: 2012-03-21 | |
4 | ||
5 | diff --git a/ttftools/jis2ascii b/ttftools/jis2ascii | |
6 | index b8a241a..b5db91d 100755 | |
7 | --- a/ttftools/jis2ascii | |
8 | +++ b/ttftools/jis2ascii | |
9 | @@ -11,7 +11,7 @@ | |
10 | ||
11 | while(<>) { | |
12 | chop; | |
13 | - split(/\s+/); | |
14 | - my $x = eval($_[0]); | |
15 | - printf "0x%04x\t%d\n", $x, $_[1] if ($x < 256); | |
16 | + @split_data = split(/\s+/); | |
17 | + my $x = eval($split_data[0]); | |
18 | + printf "0x%04x\t%d\n", $x, $split_data[1] if ($x < 256); | |
19 | } | |
20 | diff --git a/ttftools/jis2sjis b/ttftools/jis2sjis | |
21 | index 1766fa2..ccd29b9 100755 | |
22 | --- a/ttftools/jis2sjis | |
23 | +++ b/ttftools/jis2sjis | |
24 | @@ -11,8 +11,8 @@ | |
25 | ||
26 | while(<>) { | |
27 | chop; | |
28 | - split(/\s+/); | |
29 | - my $x = eval($_[0]); | |
30 | + @split_data = split(/\s+/); | |
31 | + my $x = eval($split_data[0]); | |
32 | if (256 <= $x) { | |
33 | # not optimized for readers' convenience. | |
34 | my $c = (int($x / 256) - 0x21) * (0x7e-0x21+1) + (($x % 256) - 0x21); | |
35 | diff --git a/ttftools/jis2unicode b/ttftools/jis2unicode | |
36 | index c50bd68..ffdebc4 100755 | |
37 | --- a/ttftools/jis2unicode | |
38 | +++ b/ttftools/jis2unicode | |
39 | @@ -8061,12 +8061,12 @@ if ($ARGV[0] eq '-c') { | |
40 | } else { | |
41 | while(<>) { | |
42 | chop; | |
43 | - split(/\s+/); | |
44 | - $x = $map{jis2sjis(eval($_[0]))}; | |
45 | + @split_data = split(/\s+/); | |
46 | + $x = $map{jis2sjis(eval($split_data[0]))}; | |
47 | if ($x) { | |
48 | - printf "0x%04x\t%d\n", $x, $_[1]; | |
49 | + printf "0x%04x\t%d\n", $x, $split_data[1]; | |
50 | } else { | |
51 | - print STDERR "jis2unicode: warning: undefined mapping: $_[0]\n"; | |
52 | + print STDERR "jis2unicode: warning: undefined mapping: $split_data[0]\n"; | |
53 | } | |
54 | } | |
55 | } | |
56 | diff --git a/ttftools/lib_form.pl b/ttftools/lib_form.pl | |
57 | index 89993ea..95c220e 100644 | |
58 | --- a/ttftools/lib_form.pl | |
59 | +++ b/ttftools/lib_form.pl | |
60 | @@ -18,12 +18,12 @@ sub define_form($) { | |
61 | foreach $_ (split("\n", $_[0])) { | |
62 | my $c; | |
63 | $c = $1 if (s/(\#.*)$//); | |
64 | - split(/\s+/); | |
65 | - if (2 <= @_) { | |
66 | - push(@form_fields, $_[1]); | |
67 | + @split_data = split(/\s+/); | |
68 | + if (2 <= @split_data) { | |
69 | + push(@form_fields, $split_data[1]); | |
70 | push(@form_comments, $c); | |
71 | - $_[1] =~ tr/A-Z/a-z/; | |
72 | - $form_types{$_[1]} = $_[0]; | |
73 | + @split_data[1] =~ tr/A-Z/a-z/; | |
74 | + $form_types{$split_data[1]} = $split_data[0]; | |
75 | } | |
76 | } | |
77 | 1; | |
78 | @@ -101,9 +101,9 @@ sub make_form($@) { | |
79 | open(IN, $ff) || die("open: $ff: $!"); | |
80 | %form_val = (); | |
81 | while($_ = getline(IN)) { | |
82 | - split(/\s+/); | |
83 | - next if (@_ < 2); | |
84 | - make_field1(@_); | |
85 | + @split_data = split(/\s+/); | |
86 | + next if (@split_data < 2); | |
87 | + make_field1(@split_data); | |
88 | } | |
89 | close(IN); | |
90 | foreach my $x (@extra) { | |
91 | diff --git a/ttftools/make_EBSC b/ttftools/make_EBSC | |
92 | index d17e9ff..eed0fc9 100755 | |
93 | --- a/ttftools/make_EBSC | |
94 | +++ b/ttftools/make_EBSC | |
95 | @@ -28,8 +28,8 @@ $ARGV[0] || usage(); | |
96 | open(IN, $ARGV[0]) || die("open: $ARGV[0]: $!"); | |
97 | %metric = (); | |
98 | while($_ = getline(IN)) { | |
99 | - split(/:\s+/); | |
100 | - $metric{$_[0]} = eval($_[1]); | |
101 | + @split_data = split(/:\s+/); | |
102 | + $metric{$split_data[0]} = eval($split_data[1]); | |
103 | if ($metric{'ppem'} && $metric{'subst'} && | |
104 | $metric{'ascender'} && $metric{'descender'} && $metric{'widmax'}) { | |
105 | push(@sizes, [ $metric{'ppem'}, | |
106 | diff --git a/ttftools/make_cmap b/ttftools/make_cmap | |
107 | index 7a58cd0..46074a5 100755 | |
108 | --- a/ttftools/make_cmap | |
109 | +++ b/ttftools/make_cmap | |
110 | @@ -46,8 +46,8 @@ sub readenc($) { | |
111 | @enc = (); | |
112 | open(IN, $_[0]) || die("open: $_[0]: $!"); | |
113 | while($_ = getline(IN)) { | |
114 | - split(/\s+/); | |
115 | - $enc[eval($_[0])] = eval($_[1]); | |
116 | + @split_data = split(/\s+/); | |
117 | + $enc[eval($split_data[0])] = eval($split_data[1]); | |
118 | } | |
119 | close(IN); | |
120 | } | |
121 | diff --git a/ttftools/merge_glyf b/ttftools/merge_glyf | |
122 | index a486425..f20de66 100755 | |
123 | --- a/ttftools/merge_glyf | |
124 | +++ b/ttftools/merge_glyf | |
125 | @@ -76,7 +76,7 @@ for($mrg = 0; ; $mrg++) { | |
126 | open(IN, $cmap) || die("open: $src_cmap: $!"); | |
127 | while(<IN>) { | |
128 | chop; | |
129 | - if (!/^\s*\#/) { split; $cmap_table{$_[0]} = $_[1]; } | |
130 | + if (!/^\s*\#/) { @split_data = split() ; $cmap_table{$split_data[0]} = $split_data[1]; } | |
131 | } | |
132 | close(IN); | |
133 | ||
134 | diff --git a/ttftools/pickchars b/ttftools/pickchars | |
135 | index 7e05c59..2a6bd6d 100755 | |
136 | --- a/ttftools/pickchars | |
137 | +++ b/ttftools/pickchars | |
138 | @@ -49,8 +49,8 @@ sub font1 { | |
139 | $f=shift(@ARGV); | |
140 | open(IN, $f) || die("open: $f: $!"); | |
141 | while($_ = getline(IN)) { | |
142 | - split(/\s+/); | |
143 | - $enc{eval($_[0])} = 1; | |
144 | + @split_data = split(/\s+/); | |
145 | + $enc{eval($split_data[0])} = 1; | |
146 | } | |
147 | close(IN); | |
148 | ||
149 | diff --git a/ttftools/remap_glyf b/ttftools/remap_glyf | |
150 | index 9aee8f8..4df417e 100755 | |
151 | --- a/ttftools/remap_glyf | |
152 | +++ b/ttftools/remap_glyf | |
153 | @@ -65,7 +65,7 @@ open(IN, $src_cmap) || die("open: $src_cmap: $!"); | |
154 | while(<IN>) { | |
155 | chop; | |
156 | # $src_glyfnum is a mapping from CHARACTER_CODE to GLYPH_NUMBER in the source font. | |
157 | - if (!/^\s*\#/) { split; $src_glyfnum{$_[0]} = $_[1]; } | |
158 | + if (!/^\s*\#/) { @split_data = split; $src_glyfnum{$split_data[0]} = $split_data[1]; } | |
159 | } | |
160 | close(IN); | |
161 | ||
162 | @@ -79,8 +79,8 @@ while(<IN>) { | |
163 | chop; | |
164 | if (!/^\s*\#/) { | |
165 | # $dest_charnum is a mapping from GLYPH_NUMBER to CHARACTER_CODE in the dest font. | |
166 | - split; $dest_charnum{$_[1]} = $_[0]; | |
167 | - $max_dest_glyfnum = $_[1] if ($max_dest_glyfnum < $_[1]); | |
168 | + @split_data = split; $dest_charnum{$split_data[1]} = $split_data[0]; | |
169 | + $max_dest_glyfnum = $split_data[1] if ($max_dest_glyfnum < $split_data[1]); | |
170 | } | |
171 | } | |
172 | close(IN); |
0 | Description: Fix ttfsrc's kochigothic path. | |
1 | Forwarded: Does not need. | |
2 | Author: Nobuhiro Iwamatsu <iwamatsu@debian.org> | |
3 | Last-Update: 2012-03-21 | |
4 | ||
5 | --- a/ttfsrc/Makefile 2003-09-10 11:54:11.000000000 +0900 | |
6 | +++ b/ttfsrc/Makefile 2006-11-26 14:38:57.000000000 +0900 | |
7 | @@ -33,7 +33,8 @@ | |
8 | ||
9 | # modify this: | |
10 | #BASE_OUTLINE_TTF=/usr/share/fonts/ja/TrueType/kochi-gothic.ttf # for RedHat | |
11 | -BASE_OUTLINE_TTF=/src/kochi-substitute/kochi-gothic-subst.ttf | |
12 | +BASE_OUTLINE_TTF=/usr/share/fonts/truetype/kochi/kochi-gothic-subst.ttf | |
13 | + | |
14 | MONA_OUTLINE_TTF=mona-outline.ttf | |
15 | ||
16 | TTFPACK=$(PERL) $(TTFTOOLS)/ttfpack |
0 | 0 | #!/usr/bin/make -f |
1 | %: | |
2 | dh $@ | |
1 | 3 | |
2 | #export DH_VERBOSE=1 | |
3 | ||
4 | #include dpatch stuff | |
5 | include /usr/share/dpatch/dpatch.make | |
6 | ||
7 | configure: configure-stamp | |
8 | configure-stamp: | |
9 | dh_testdir | |
10 | ||
11 | touch configure-stamp | |
12 | ||
13 | build: patch-stamp configure-stamp build-stamp | |
14 | build-stamp: | |
15 | dh_testdir | |
4 | override_dh_auto_build: | |
16 | 5 | -mkdir dist |
17 | 6 | make bdf |
18 | 7 | (cd dist; for i in *.bdf; do bdftopcf $$i|gzip -c9 > `basename $$i .bdf`.pcf.gz; done) |
19 | ||
20 | 8 | make -C ttfsrc |
21 | touch build-stamp | |
22 | 9 | |
23 | clean: unpatch | |
24 | dh_testdir | |
25 | dh_testroot | |
26 | make clean -C ttfsrc | |
27 | make clean | |
28 | ||
29 | -rm -f dist/* | |
30 | rm -f build-stamp configure-stamp | |
31 | ||
32 | dh_clean | |
33 | ||
34 | install: build | |
35 | dh_testdir | |
36 | dh_testroot | |
37 | dh_clean -k | |
38 | dh_installdirs | |
39 | ||
10 | override_dh_auto_install: | |
40 | 11 | # Add here commands to install the package into debian/tmp. |
41 | 12 | cp dist/*.pcf.gz `pwd`/debian/xfonts-mona/usr/share/fonts/X11/misc |
42 | 13 | # ttf copy |
43 | mkdir -p `pwd`/debian/ttf-mona/usr/share/fonts/truetype/mona/. | |
14 | mkdir -p `pwd`/debian/fonts-mona/usr/share/fonts/truetype/mona/. | |
44 | 15 | install -m 644 ttfsrc/mona.ttf \ |
45 | `pwd`/debian/ttf-mona/usr/share/fonts/truetype/mona/ | |
16 | `pwd`/debian/fonts-mona/usr/share/fonts/truetype/mona/ | |
46 | 17 | |
47 | # gzip -9 `pwd`/debian/xfonts-mona/usr/X11R6/lib/X11/fonts/misc/*.pcf | |
18 | #gzip -9 `pwd`/debian/xfonts-mona/usr/X11R6/lib/X11/fonts/misc/*.pcf | |
48 | 19 | |
49 | dh_install -i | |
20 | override_dh_auto_clean: | |
50 | 21 | |
51 | # Build architecture-dependent files here. | |
52 | binary-arch: build install | |
53 | # We have nothing to do by default. | |
22 | make clean -C ttfsrc | |
23 | make clean | |
24 | -rm -f dist/* | |
54 | 25 | |
55 | # Build architecture-independent files here. | |
56 | binary-indep: build install | |
57 | dh_testdir | |
58 | dh_testroot | |
59 | dh_installchangelogs | |
60 | dh_installdocs | |
61 | dh_installexamples | |
62 | # dh_install | |
63 | # dh_installmenu | |
64 | # dh_installdebconf | |
65 | # dh_installlogrotate | |
66 | # dh_installemacsen | |
67 | # dh_installpam | |
68 | # dh_installmime | |
69 | # dh_installinit | |
70 | # dh_installcron | |
71 | # dh_installinfo | |
72 | dh_installman | |
73 | dh_link | |
74 | dh_strip | |
75 | dh_compress | |
76 | dh_fixperms | |
77 | # dh_perl | |
78 | # dh_python | |
79 | # dh_makeshlibs | |
80 | dh_installdeb | |
81 | dh_shlibdeps | |
82 | dh_gencontrol | |
83 | dh_md5sums | |
84 | dh_builddeb | |
85 | ||
86 | binary: binary-indep binary-arch | |
87 | .PHONY: build clean binary-indep binary-arch binary install | |
26 | dh_auto_clean |
0 | 3.0 (quilt) |
0 | #! /bin/sh | |
1 | set -e | |
2 | ||
3 | # font alternatives | |
4 | ALT_NAME="ttf-japanese-gothic" | |
5 | FONT_ENTRY="/usr/share/fonts/truetype/mona/mona.ttf" | |
6 | FONT_PRIORITY=20 | |
7 | ||
8 | add_alternate_font_entry() | |
9 | { | |
10 | update-alternatives --install \ | |
11 | /usr/share/fonts/truetype/$ALT_NAME.ttf \ | |
12 | $ALT_NAME.ttf \ | |
13 | $FONT_ENTRY \ | |
14 | $FONT_PRIORITY | |
15 | } | |
16 | ||
17 | case "$1" in | |
18 | configure) | |
19 | # alternatives | |
20 | # remove old ttf-japanese-gothic alternatives | |
21 | update-alternatives --remove $ALT_NAME $FONT_ENTRY | |
22 | ||
23 | # * remove not ".ttf" postfix file | |
24 | if [ -f /usr/share/fonts/truetype/$ALT_NAME ]; then | |
25 | rm /usr/share/fonts/truetype/$ALT_NAME | |
26 | fi | |
27 | ||
28 | add_alternate_font_entry | |
29 | ;; | |
30 | ||
31 | abort-upgrade|abort-remove|abort-deconfigure) | |
32 | ||
33 | ;; | |
34 | ||
35 | *) | |
36 | echo "postinst called with unknown argument \`$1'" >&2 | |
37 | exit 1 | |
38 | ;; | |
39 | esac | |
40 | ||
41 | # dh_installdeb will replace this with shell code automatically | |
42 | # generated by other debhelper scripts. | |
43 | ||
44 | #DEBHELPER# | |
45 | ||
46 | exit 0 |
0 | #!/bin/sh | |
1 | ||
2 | set -e | |
3 | ||
4 | PKG="ttf-mona" | |
5 | PKG_VERSION="2.90-5" | |
6 | ||
7 | rm_conffile() { | |
8 | PKGNAME="$1" | |
9 | CONFFILE="$2" | |
10 | if [ -e "$CONFFILE" ]; then | |
11 | md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" | |
12 | old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" | |
13 | if [ "$md5sum" != "$old_md5sum" ]; then | |
14 | echo "Obsolete conffile $CONFFILE has been modified by you." | |
15 | echo "Saving as $CONFFILE.dpkg-bak ..." | |
16 | mv -f "$CONFFILE" "$CONFFILE".dpkg-bak | |
17 | else | |
18 | echo "Removing obsolete conffile $CONFFILE ..." | |
19 | rm -f "$CONFFILE" | |
20 | fi | |
21 | fi | |
22 | } | |
23 | ||
24 | case "$1" in | |
25 | install|upgrade) | |
26 | if dpkg --compare-versions "$2" lt-nl "$PKG_VERSION"; then | |
27 | FILE="/etc/defoma/hints/${PKG}.hints" | |
28 | if [ -f $FILE ]; then | |
29 | if [ -x /usr/bin/defoma-font ]; then | |
30 | defoma-font purge-all $FILE || true | |
31 | fi | |
32 | fi | |
33 | rm_conffile $PKG $FILE | |
34 | fi | |
35 | esac | |
36 | ||
37 | #DEBHELPER# | |
38 | exit 0 |
0 | #! /bin/sh | |
1 | # prerm script for ttf-mona | |
2 | # Nobuhiro Iwamatsu <iwamatsu@debian.org> | |
3 | # see: dh_installdeb(1) | |
4 | set -e | |
5 | ||
6 | DEFOMA_FONT=/usr/bin/defoma-font | |
7 | PACKAGE_NAME=ttf-mona | |
8 | DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints | |
9 | # font alternatives | |
10 | ALT_NAME="ttf-japanese-gothic" | |
11 | FONT_ENTRY="/usr/share/fonts/truetype/mona/mona.ttf" | |
12 | ||
13 | # summary of how this script can be called: | |
14 | # * <prerm> `remove' | |
15 | # * <old-prerm> `upgrade' <new-version> | |
16 | # * <new-prerm> `failed-upgrade' <old-version> | |
17 | # * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> | |
18 | # * <deconfigured's-prerm> `deconfigure' `in-favour' | |
19 | # <package-being-installed> <version> `removing' | |
20 | # <conflicting-package> <version> | |
21 | # for details, see http://www.debian.org/doc/debian-policy/ or | |
22 | # the debian-policy package | |
23 | ||
24 | case "$1" in | |
25 | upgrade|deconfigure) | |
26 | if [ -x $DEFOMA_FONT ]; then | |
27 | $DEFOMA_FONT -vt purge-all $DEFOMA_HINTS_FILE >/dev/null | |
28 | fi | |
29 | ;; | |
30 | remove) | |
31 | # avoid previous package's bug. | |
32 | if [ -f /usr/share/fonts/truetype/"$ALT_NAME" ]; then | |
33 | rm /usr/share/fonts/truetype/"$ALT_NAME" | |
34 | fi | |
35 | # alternative | |
36 | update-alternatives --remove $ALT_NAME $FONT_ENTRY | |
37 | update-alternatives --remove $ALT_NAME.ttf $FONT_ENTRY | |
38 | ;; | |
39 | failed-upgrade) | |
40 | ;; | |
41 | *) | |
42 | echo "prerm called with unknown argument \`$1'" >&2 | |
43 | exit 1 | |
44 | ;; | |
45 | esac | |
46 | ||
47 | # dh_installdeb will replace this with shell code automatically | |
48 | # generated by other debhelper scripts. | |
49 | ||
50 | #DEBHELPER# | |
51 | ||
52 | exit 0 |