Package: ttf-kochi
Severity: minor
Tags: patch

We Japanese Font pakcage maintainers devised the policy of the Japanese font[0].
And registered this as Debian policy.
Please support it.

Best regards,
 Nobuhiro

[0]: http://wiki.debian.org/Fonts/JapanesefontpkgProposal

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Nobuhiro Iwamatsu
diff --git a/ttf-kochi-1.0.20030809/debian/control b/ttf-kochi-1.0.20030809/debian/control
index 9f4a772..42bbafa 100644
--- a/ttf-kochi-1.0.20030809/debian/control
+++ b/ttf-kochi-1.0.20030809/debian/control
@@ -2,15 +2,14 @@ Source: ttf-kochi
 Section: x11
 Priority: optional
 Maintainer: GOTO Masanori <[EMAIL PROTECTED]>
-Build-Depends-Indep: debhelper (>> 4.0.0), bzip2
-Standards-Version: 3.6.1
+Build-Depends: debhelper (>> 5.0.0), bzip2
+Standards-Version: 3.7.3
 
 Package: ttf-kochi-mincho
 Architecture: all
 Depends: defoma
 Suggests: ttf-kochi-gothic | ttf-kochi-gothic-naga10, x-ttcidfont-conf, xserver-xorg | xfs-xtt (>> 1:1.3.0.1-3) | xfs (>= 4.0.2-1)
-Conflicts: ttf-kochi-mincho-naga10
-Provides: ttf-kochi-mincho-naga10
+Provides: ttf-kochi-mincho-naga10, ttf-japanese-mincho
 Description: Kochi Subst Mincho Japanese TrueType font without naga10
  ttf-kochi-mincho is high quality, Japanese mincho TrueType font.
  It does not include naga10 font, so it's DFSG-free.
@@ -25,8 +24,7 @@ Package: ttf-kochi-gothic
 Architecture: all
 Depends: defoma
 Suggests: ttf-kochi-mincho | ttf-kochi-mincho-naga10, x-ttcidfont-conf, xserver-xorg | xfs-xtt (>> 1:1.3.0.1-3) | xfs (>= 4.0.2-1)
-Conflicts: ttf-kochi-gothic-naga10
-Provides: ttf-kochi-gothic-naga10
+Provides: ttf-kochi-gothic-naga10, ttf-japanese-gothic
 Description: Kochi Subst Gothic Japanese TrueType font without naga10
  ttf-kochi-gothic is high quality, Japanese gothic TrueType font.
  It does not include naga10 font, so it's DFSG-free.
diff --git a/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.postinst b/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.postinst
index e2abd24..cd79c0b 100644
--- a/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.postinst
+++ b/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.postinst
@@ -2,12 +2,27 @@
 # postinst script for ttf-kochi-naga10
 #
 # see: dh_installdeb(1)
+#
+# Add support alternatives by Nobuhiro Iwamatsu
 
 set -e
 
 PACKAGE_NAME=ttf-kochi-gothic
 DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
+# font alternatives
+ALT_NAME="ttf-japanese-gothic.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/kochi/kochi-gothic.ttf"
+
+add_font_entry ()
+{
+	update-alternatives --install \
+	/usr/share/fonts/truetype/ttf-japanese-gothic.ttf \
+	$ALT_NAME \
+	$FONT_ENTRY \
+	20
+}
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -31,6 +46,9 @@ case "$1" in
 
         /usr/bin/defoma-font -vt reregister-all $DEFOMA_HINTS_FILE
 
+	# alternatives
+	add_font_entry
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.prerm b/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.prerm
index 7500170..81870d5 100644
--- a/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.prerm
+++ b/ttf-kochi-1.0.20030809/debian/ttf-kochi-gothic.prerm
@@ -2,12 +2,18 @@
 # prerm script for ttf-kochi-naga10
 #
 # see: dh_installdeb(1)
+#
+# Add support alternatives by Nobuhiro Iwamatsu
 
 set -e
 
 PACKAGE_NAME=ttf-kochi-gothic
 DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
+# font alternatives
+ALT_NAME="ttf-japanese-gothic.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/kochi/kochi-gothic.ttf"
+
 # summary of how this script can be called:
 #        * <prerm> `remove'
 #        * <old-prerm> `upgrade' <new-version>
@@ -21,11 +27,16 @@ DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
 
 case "$1" in
-    remove|upgrade|deconfigure)
+    upgrade|deconfigure)
 #       install-info --quiet --remove /usr/info/ttf-kochi-naga10.info.gz
 
         /usr/bin/defoma-font -vt purge-all $DEFOMA_HINTS_FILE
+	;;
+
+    remove)
+        /usr/bin/defoma-font -vt purge-all $DEFOMA_HINTS_FILE
 
+	update-alternatives --remove $ALT_NAME $FONT_ENTRY
         ;;
     failed-upgrade)
         ;;
diff --git a/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.postinst b/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.postinst
index 9f775bd..04db777 100644
--- a/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.postinst
+++ b/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.postinst
@@ -2,12 +2,27 @@
 # postinst script for ttf-kochi-naga10
 #
 # see: dh_installdeb(1)
+#
+# Add support alternatives by Nobuhiro Iwamatsu
 
 set -e
 
 PACKAGE_NAME=ttf-kochi-mincho
 DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
+# font alternatives
+ALT_NAME="ttf-japanese-mincho.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/kochi/kochi-mincho.ttf"
+
+add_font_entry ()
+{
+	update-alternatives --install \
+	/usr/share/fonts/truetype/ttf-japanese-mincho.ttf \
+	$ALT_NAME \
+	$FONT_ENTRY \
+	20
+}
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -31,6 +46,9 @@ case "$1" in
 
         /usr/bin/defoma-font -vt reregister-all $DEFOMA_HINTS_FILE
 
+	# alternatives
+	add_font_entry
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.prerm b/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.prerm
index 3217839..67820a3 100644
--- a/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.prerm
+++ b/ttf-kochi-1.0.20030809/debian/ttf-kochi-mincho.prerm
@@ -2,12 +2,18 @@
 # prerm script for ttf-kochi-naga10
 #
 # see: dh_installdeb(1)
+#
+# Add support alternatives by Nobuhiro Iwamatsu
 
 set -e
 
 PACKAGE_NAME=ttf-kochi-mincho
 DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
+# font alternatives
+ALT_NAME="ttf-japanese-mincho.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/kochi/kochi-mincho.ttf"
+
 # summary of how this script can be called:
 #        * <prerm> `remove'
 #        * <old-prerm> `upgrade' <new-version>
@@ -21,11 +27,16 @@ DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
 
 
 case "$1" in
-    remove|upgrade|deconfigure)
+    upgrade|deconfigure)
 #       install-info --quiet --remove /usr/info/ttf-kochi-naga10.info.gz
 
         /usr/bin/defoma-font -vt purge-all $DEFOMA_HINTS_FILE
+	;;
 
+    remove)
+        /usr/bin/defoma-font -vt purge-all $DEFOMA_HINTS_FILE
+        # alternatives
+	update-alternatives --remove $ALT_NAME $FONT_ENTRY
         ;;
     failed-upgrade)
         ;;

Reply via email to