diff -u scim-hangul-0.2.1/debian/control scim-hangul-0.2.1/debian/control --- scim-hangul-0.2.1/debian/control +++ scim-hangul-0.2.1/debian/control @@ -9,6 +9,7 @@ Package: scim-hangul Architecture: any Depends: ${shlibs:Depends} +Recommends: im-switch Suggests: ttf-unfonts, ttf-alee Description: Hangul Input Method Engine for SCIM SCIM (Smart Common Input Method) is an input method (IM) platform. diff -u scim-hangul-0.2.1/debian/rules scim-hangul-0.2.1/debian/rules --- scim-hangul-0.2.1/debian/rules +++ scim-hangul-0.2.1/debian/rules @@ -104,6 +104,11 @@ # Prepare files for different packages to separate directories dh_install --sourcedir=debian/tmp --fail-missing + # Install im-switch configuration files + install -m 644 -D debian/im-switch/xim \ + debian/scim-hangul/etc/X11/xinit/xinput.d/scim-hangul_xim + install -m 644 -D debian/im-switch/scim \ + debian/scim-hangul/etc/X11/xinit/xinput.d/scim-hangul_scim touch install-stamp diff -u scim-hangul-0.2.1/debian/changelog scim-hangul-0.2.1/debian/changelog --- scim-hangul-0.2.1/debian/changelog +++ scim-hangul-0.2.1/debian/changelog @@ -1,3 +1,14 @@ +scim-hangul (0.2.1-1ubuntu1) dapper; urgency=low + + * Add im-switch support. (Ubuntu #33763) + - Write two im-switch configuration files (for GTK/Qt IM module and XIM) + and install them into /etc/X11/xinit/xinput.d/. + - Add postinst and prerm scripts to handle the alternatives system used by + im-switch. + - Add im-switch to Recommends. + + -- Ming Hua Sun, 5 Mar 2006 13:38:42 -0600 + scim-hangul (0.2.1-1) unstable; urgency=low [ Ming Hua ] only in patch2: unchanged: --- scim-hangul-0.2.1.orig/debian/postinst +++ scim-hangul-0.2.1/debian/postinst @@ -0,0 +1,31 @@ +#!/bin/sh + +set -e + +# Install im-switch support for ko_KR +IM_SWITCH_SUPPORT_DIR="/etc/X11/xinit/xinput.d" +if [ "$1" = "configure" ]; then + # The configuration using GTK and Qt IM module is installed at + # priority 45, the one using XIM is installed at priority 40. It is + # set below 50 because scim-hangul will be installed by default by + # Korean language pack, therefore it should have lower priority than + # other Korean input methods (such as nabi), which usually set + # priority to 50. + if [ -e "$IM_SWITCH_SUPPORT_DIR/scim-hangul_scim" ]; then + update-alternatives --install \ + "$IM_SWITCH_SUPPORT_DIR/ko_KR" \ + xinput-ko_KR \ + "$IM_SWITCH_SUPPORT_DIR/scim-hangul_scim" \ + 45 + fi + if [ -e "$IM_SWITCH_SUPPORT_DIR/scim-hangul_xim" ]; then + update-alternatives --install \ + "$IM_SWITCH_SUPPORT_DIR/ko_KR" \ + xinput-ko_KR \ + "$IM_SWITCH_SUPPORT_DIR/scim-hangul_xim" \ + 40 + fi +fi + +# Nothing should be added by debhelper, this is just to satisfy lintian +#DEBHELPER# only in patch2: unchanged: --- scim-hangul-0.2.1.orig/debian/im-switch/scim +++ scim-hangul-0.2.1/debian/im-switch/scim @@ -0,0 +1,13 @@ +# im-switch configuration file for scim-hangul +# should be installed as /etc/X11/xinit/xinput.d/scim-hangul_scim +# this configuration uses GTK IM module and Qt IM module provided by SCIM + +# exported enviroment variables +XMODIFIERS="@im=SCIM" +GTK_IM_MODULE="scim" +QT_IM_MODULE="scim" +# command and arguments to invoke scim +XIM_PROGRAM="/usr/bin/scim" +XIM_ARGS="--daemon" +# package dependency +DEPENDS="scim, scim-gtk2-immodule | scim-qtimm" only in patch2: unchanged: --- scim-hangul-0.2.1.orig/debian/im-switch/xim +++ scim-hangul-0.2.1/debian/im-switch/xim @@ -0,0 +1,13 @@ +# im-switch configuration file for scim-hangul +# should be installed as /etc/X11/xinit/xinput.d/scim-hangul_scim +# this configuration uses XIM + +# exported enviroment variables +XMODIFIERS="@im=SCIM" +GTK_IM_MODULE="xim" +QT_IM_MODULE="xim" +# command and arguments to invoke scim +XIM_PROGRAM="/usr/bin/scim" +XIM_ARGS="--daemon" +# package dependency +DEPENDS="scim" only in patch2: unchanged: --- scim-hangul-0.2.1.orig/debian/prerm +++ scim-hangul-0.2.1/debian/prerm @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +# Remove im-switch support for ko_KR +IM_SWITCH_SUPPORT_DIR="/etc/X11/xinit/xinput.d" +if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then + update-alternatives --remove \ + xinput-ko_KR \ + "$IM_SWITCH_SUPPORT_DIR/scim-hangul_scim" + update-alternatives --remove \ + xinput-ko_KR \ + "$IM_SWITCH_SUPPORT_DIR/scim-hangul_xim" +fi + +# Nothing should be added by debhelper, this is just to satisfy lintian +#DEBHELPER#