diff --git a/fcitx-README.suse b/fcitx-README.suse new file mode 100644 index 0000000..eac011c --- /dev/null +++ b/fcitx-README.suse @@ -0,0 +1,62 @@ +fcitx README for SuSE +How to start using fcitx + +English: + +1.openSUSE can start fcitx automatically when your locale is set to en, zh_CN. +The setup script is a link in /etc/X11/xim.d/YOUR-LOCALE/30-fcitx which link to /etc/X11/xim.d/fcitx. +The number "30" makes fcitx have priority over other input-method (e.g 50-scim or 90-xcin ). +If you prefer not using fcitx, mv 30-fcitx to 80-fcitx (for example). Or see 2. + +2.If for some reason can't start fcitx when login Xwindow +There is another input-method who has higher priority then fcitx (e.g 10-oxim) +You can edit ~/.xim, see ~/.xim.template for more informations. +Or edit ~/.profile, add +export INPUT_METHOD="fcitx" +After installing fcitx, there's a template for fcitx: /usr/share/doc/packages/fcitx/xim.fcitx.suse.template +copy this file to ~/.xim, then you can use fcitx next login X. + +3.You want to use your own input-method other than system setting +(1)System setting: +Edit /etc/sysconfig/language , set INPUT_METHOD="scim-bridge", or whatever you want,Make sure your start-up script is put in /etc/X11/xim.d/ with same name ypu mention. +(2)For specific language setting: +Link a start-up script in /etc/X11/xim.d/ to your locale with a higher priority (smaller number), eg +ln -s /etc/X11/xim.d/scim-bridge /etc/X11/xim.d/zh_CN/20-scim-bridge +(3)Personal setting: +Edit ~/.profile add +export INPUT_METHOD="scim-bridge" or whatever script in /etc/X11/xim.d/ +or white your own ~/.xim, see ~/.xim.template for more informations. + +4.Bug report or any suggestion to +http://code.google.com/p/fcitx/ + + +Chinese: + +1.当您使用的语系是en 或zh_CN时,SuSE 会自动启动fcitx +启动的script是/etc/X11/xim.d/YOUR-LOCALE/30-fcitx,这是一个到上层目录fcitx的连结 +"30"这个数字使他的优先顺序高于90-xcin及50-scim +如果您不喜欢这个顺序,修改连结的名称为(例如:80-fcitx),或参考2. + +2.重新登入X后,如果不能用fcitx...可能是: +有别的输入法的优先顺序高于fcitx(例如:10-oxim) +您可以编辑~/.xim,请参考~/.xim.template +安装fcitx后,会有一个范本:/usr/share/doc/packages/fcitx/xim.fcitx.suse.template +将这个档案复制到您的~/.xim,当您下次登入X时就可以使用fcitx了 +或编辑~/.profile,加入 +export INPUT_METHOD="fcitx" + +3.如果您想要自己选择输入法而非使用系统设定 +(1)全系统设定: +编辑 /etc/sysconfig/language, 设定 INPUT_METHOD="ibus" 或其他你想用的输入法, +请注意你的启动程序必须位于 /etc/X11/xim.d/,并和您指定的名称相同 +(2)针对特定语言: +将您的启动程序连结到你的语系中,并前置较高的优先顺序(较小数字),例如 +ln -s /etc/X11/xim.d/fcitx /etc/X11/xim.d/zh_CN/20-scim-bridge +(3)个人设定: +编辑 ~/.profile 加入 +export INPUT_METHOD="fcitx" 或其他在 /etc/X11/xim.d/ 的启动程序 +或自行编写启动程序 ~/.xim,请参考 ~/.xim.template + +5.臭虫回报或建议请至 +http://code.google.com/p/fcitx/ diff --git a/fcitx.changes b/fcitx.changes new file mode 100644 index 0000000..8d7781e --- /dev/null +++ b/fcitx.changes @@ -0,0 +1,36 @@ +------------------------------------------------------------------ +Tue Sep 13 04:01:59 UTC 2011 - stecue@gmail.com + +- im-modules packaged. Thanks to hillwood (hillwood@linuxfans.org)! +- xim is still the default method. + +------------------------------------------------------------------- +Fri Sep 9 15:02:04 UTC 2011 - stecue@gmail.com + +- upstream version 4.1.1 + +------------------------------------------------------------------- +Wed Sep 7 19:49:14 UTC 2011 - stecue@gmail.com + +- upstream version 4.1.0 + * support im-module (gtk2, gtk3 and qt), not packaged yet + +------------------------------------------------------------------- +* Tue Jun 14 00:56:36 UTC 2011 swyear +- Add start up script, README and template +------------------------------------------------------------------- +* Tue May 17 00:00:00 UTC 2011 stecue +- upstream version 4.0.1. +- Add xim dependency for openSUSE 11.4 +------------------------------------------------------------------- +* Sat Sep 18 00:00:00 UTC 2010 CSSlayer +- Make it works with newest +------------------------------------------------------------------- +* Fri Jun 11 00:00:00 UTC 2004 xyb +- Add data/tables.conf +------------------------------------------------------------------- +* Mon Feb 2 00:00:00 UTC 2004 xyb +- Fix spec bug(patch by hamigua). +------------------------------------------------------------------- +* Thu Jan 15 00:00:00 UTC 2004 xyb +- skeleton RPM diff --git a/fcitx.spec b/fcitx.spec index df60d4d..223618e 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -1,7 +1,7 @@ Name: fcitx Version: 4.1.1 Release: 1 -Summary: Free Chinese Input Toy for X (XIM) +Summary: Free Chinese Input Toy for X Packager: hillwood URL: http://www.fcitx.org/ Group: System Environment/Libraries @@ -9,6 +9,8 @@ License: GPL Source: %{name}-%{version}_all.tar.bz2 Source1: xim.d-fcitx Source2: xinput-fcitx.conf +Source3: fcitx-README.suse +Source4: xim.fcitx.suse.template BuildRequires: cairo-devel BuildRequires: pango-devel %if 0%{?suse_version} @@ -24,7 +26,9 @@ BuildRequires: qt-devel BuildRequires: intltool BuildRequires: cmake BuildRequires: gtk2-devel +#If you do not use immodule-fcitx, you have to use immodule-fcitx %if 0%{?suse_version} > 1130 +Requires: gtk2-immodule-xim, gtk3-immodule-xim BuildRequires: gtk3-devel %endif %if 0%{?fedora} > 14 @@ -38,7 +42,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} FCITX is a simplified Chinese input server. It supports Tables, Pinyin and QuWei input method. It's small and fast. - +Since version 4.1, FCITX itself can be use as an im-module. XIM +can still be used but not necessary. + %package devel Summary: Development files for %{name} Group: Development/Libraries @@ -51,7 +57,8 @@ The %{name}-devel package includes the header files for the %{name} package. Summary: Gtk2 IM Module for %{name} Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} -Requires: gtk2-immodule-xim +#XIM is not necessary if using immodule-fcitx. +#Requires: gtk2-immodule-xim %description gtk2 This package contains %{name} im module for gtk2 @@ -61,7 +68,8 @@ This package contains %{name} im module for gtk2 Summary: Gtk3 IM Module for %{name} Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} -Requires: gtk3-immodule-xim +#XIM is not necessary if using immodule-fcitx. +#Requires: gtk3-immodule-xim %description gtk3 This package contains %{name} im module for gtk3 @@ -97,12 +105,14 @@ cd build %if 0%{?suse_version} %if 0%{?suse_version} < 1140 -cmake .. -DENABLE_GTK3_IM_MODULE=off \ +cmake .. -DENABLE_GTK2_IM_MODULE=On \ + -DENABLE_GTK3_IM_MODULE=Off \ -DENABLE_QT_IM_MODULE=On \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLIB_INSTALL_DIR=%{_libdir} %else -cmake .. -DENABLE_GTK3_IM_MODULE=On \ +cmake .. -DENABLE_GTK2_IM_MODULE=On \ + -DENABLE_GTK3_IM_MODULE=On \ -DENABLE_QT_IM_MODULE=On \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLIB_INSTALL_DIR=%{_libdir} @@ -137,14 +147,14 @@ cmake .. -DENABLE_GTK3_IM_MODULE=off \ make %install -rm -rf $RPM_BUILD_ROOT +#rm -rf $RPM_BUILD_ROOT cd build make DESTDIR=$RPM_BUILD_ROOT install cd .. -rm $RPM_BUILD_ROOT/usr/share/doc/ -r +#rm $RPM_BUILD_ROOT/usr/share/doc/ -r %if 0%{?suse_version} %suse_update_desktop_file fcitx Utility DesktopUtility @@ -152,13 +162,27 @@ rm $RPM_BUILD_ROOT/usr/share/doc/ -r %suse_update_desktop_file fcitx-configtool System SystemSetup mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/ install -m 644 $RPM_SOURCE_DIR/xim.d-fcitx $RPM_BUILD_ROOT/etc/X11/xim.d/fcitx + +rm -f $RPM_BUILD_ROOT%{_libdir}/libfcitx-config.la + +pushd $RPM_BUILD_ROOT/etc/X11/xim.d/ + for lang in en zh_CN ; do + mkdir $lang + pushd $lang + ln -s ../fcitx 30-fcitx + popd + done +popd + %else mkdir -p $RPM_BUILD_ROOT/etc/X11/xinit/xinput.d/ install -m 644 $RPM_SOURCE_DIR/xinput-fcitx.conf $RPM_BUILD_ROOT/etc/X11/xinit/xinput.d/fcitx.conf %endif %find_lang %{name} - + +#%fdupes -s %{buildroot} + %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} @@ -197,7 +221,7 @@ touch var/adm/SuSEconfig/run-gtk %{_datadir}/%{name}/data/* %{_datadir}/%{name}/pinyin/* %{_datadir}/%{name}/table/* -#%{_datadir}/doc/%{name}/ +%{_datadir}/doc/%{name}/ %{_datadir}/applications/*.desktop %{_datadir}/icons/* %{_mandir}/man1/*.gz @@ -223,6 +247,8 @@ touch var/adm/SuSEconfig/run-gtk %{_datadir}/%{name}/skin/classic %if 0%{?suse_version} %dir /etc/X11/xim.d +%dir /etc/X11/xim.d/en +%dir /etc/X11/xim.d/zh_CN /etc/X11/xim.d/* %else %dir /etc/X11/xinit/xinput.d @@ -261,17 +287,3 @@ touch var/adm/SuSEconfig/run-gtk %{_libdir}/qt4/* %changelog -* Sat Sep 10 2011 hillwood -- add gtk2-immodule-xim and gtk3-immodule-xim require - -* Fri Sep 9 2011 hillwood -- update to 4.1.1 - -* Mon Sep 5 2011 hillwood -- update to 4.1.0. - -* Thu May 17 2011 hillwood -- add gtk-immodule-xim require - -* Mon Mar 14 2011 hillwood -- first package for 4.0.1 diff --git a/xim.fcitx.suse.template b/xim.fcitx.suse.template new file mode 100644 index 0000000..265320d --- /dev/null +++ b/xim.fcitx.suse.template @@ -0,0 +1,22 @@ +#~/.xim template for users to set fcitx as default input method +#copy this file to ~/.xim +#logout and login again, that's all +#for more infomations, see ~/.xim.template + +#if any program can't input Chinese, try export LC_CTYPE=zh_CN.UTF-8, e.g + +#export LC_CTYPE=zh_CN.UTF-8 +export XMODIFIERS="@im=fcitx" +export GTK_IM_MODULE=xim +export QT_IM_SWITCHER=imsw-multi +export QT_IM_MODULE=xim +fcitx -d + +## Note for FCITX version >= 4.1 +#Since FCITX 4.1, you can use fcitx itself (besides xim) as the immodule,so the following code might work better (fcitx-gtk2/3, fcitx-qt must be installed), especially when you are using gnome3. + +#export XMODIFIERS="@im=fcitx" +#export GTK_IM_MODULE=fcitx +#export QT_IM_MODULE=fcitx +#fcitx -d +#