Okay, so this is a patch for adding im-switch support to scim-pinyin by
Emfox Zhou.  The patch is against SVN trunk.

Emfox, I really appreciate your effort on helping the im-switch support
issue.  However I'd like to show you the way I prefer to handle Debian
work, that is, file a bug in BTS (which Carlos has done), reassign it to
the proper package if necessary, send patches to BTS directly (if you
don't use the SVN, against last release in sid is fine), and discuss on
the BTS.  This way I can always point people to this bug report if they
ask me about im-switch later, instead of explaining again and again on
IRC or in private mail.

You may find this extra work for you, but some one need to do it.  And
believe me, after being asked about im-switch for more than ten times, I
would feel spending half an hour doing all these is much more pleasant
than doing things informally and less publicly.

Thanks again for the patch,
Ming
2005.10.23
Index: control
===================================================================
--- control     (revision 669)
+++ control     (working copy)
@@ -9,7 +9,7 @@
 Package: scim-pinyin
 Architecture: any
 Depends: ${shlibs:Depends}, scim
-Recommends: ttf-arphic-gbsn00lp | ttf-arphic-gkai00mp, ttf-arphic-bsmi00lp | 
ttf-arphic-bkai00mp
+Recommends: ttf-arphic-gbsn00lp | ttf-arphic-gkai00mp, ttf-arphic-bsmi00lp | 
ttf-arphic-bkai00mp, im-switch
 Description: Smart pinyin IM engine module for SCIM
  SCIM (Smart Common Input Method) is an input method (IM) platform.
  .
Index: scim-pinyin.postinst
===================================================================
--- scim-pinyin.postinst        (revision 0)
+++ scim-pinyin.postinst        (revision 0)
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+        update-alternatives \
+        --install /etc/X11/xinit/xinput.d/zh_CN xinput-zh_CN \
+        /etc/X11/xinit/xinput.d/scim-pinyin 50
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
Index: scim-pinyin.prerm
===================================================================
--- scim-pinyin.prerm   (revision 0)
+++ scim-pinyin.prerm   (revision 0)
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        update-alternatives --remove xinput-zh_CN 
/etc/X11/xinit/xinput.d/scim-pinyin
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
Index: scim-pinyin.install
===================================================================
--- scim-pinyin.install (revision 669)
+++ scim-pinyin.install (working copy)
@@ -1,3 +1,5 @@
+etc/X11/xinit/xinput.d/scim-pinyin
+
 usr/lib/scim-1.0/1.4.0/IMEngine/pinyin.so
 usr/lib/scim-1.0/1.4.0/SetupUI/pinyin-imengine-setup.so
 
Index: im-switch/scim-pinyin
===================================================================
--- im-switch/scim-pinyin       (revision 0)
+++ im-switch/scim-pinyin       (revision 0)
@@ -0,0 +1,5 @@
+XIM=SCIM
+XIM_PROGRAM=/usr/bin/scim
+XIM_ARGS="-d"
+GTK_IM_MODULE=scim
+DEPENDS="scim-pinyin|scim-tables-zh"
Index: changelog
===================================================================
--- changelog   (revision 669)
+++ changelog   (working copy)
@@ -1,6 +1,6 @@
 scim-pinyin (0.5.0-1+SVN) UNRELEASED; urgency=low
 
-  * dummy entry
+  * add im-switch support for zh_CN.  [Emfox Zhou]
 
  -- Ming Hua <[EMAIL PROTECTED]>  Sun,  9 Oct 2005 18:42:14 -0500
 
Index: rules
===================================================================
--- rules       (revision 669)
+++ rules       (working copy)
@@ -92,6 +92,7 @@
        # Use the upstream makefile to install everything into
        # debian/tmp
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+       install -m 644 -D debian/im-switch/scim-pinyin 
$(CURDIR)/debian/tmp/etc/X11/xinit/xinput.d/scim-pinyin
 
        # Clean up unnecessary static libraries for modules
        rm debian/tmp/usr/lib/scim-1.0/1.4.0/*/*.la

Reply via email to