forked from pool/fcitx
Accepting request 73462 from home:swyear:branches:M17N
- Add start up script, README and template OBS-URL: https://build.opensuse.org/request/show/73462 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=4
This commit is contained in:
parent
cd76fd0712
commit
d23991c55c
62
fcitx-README.suse
Normal file
62
fcitx-README.suse
Normal file
@ -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/
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 14 00:56:36 UTC 2011 - swyear@gmail.com
|
||||
|
||||
- Add start up script, README and template
|
||||
|
||||
-------------------------------------------------------------------
|
||||
* Tue May 17 00:00:00 UTC 2011 stecue <stecue@gmail.com>
|
||||
- upstream version 4.0.1.
|
||||
|
24
fcitx.spec
24
fcitx.spec
@ -14,6 +14,9 @@ License: GPL
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: %{name}.desktop
|
||||
Source2: %{name}-configtool.desktop
|
||||
Source3: xim.d-fcitx
|
||||
Source4: fcitx-README.suse
|
||||
Source5: xim.fcitx.suse.template
|
||||
BuildRequires: cairo-devel
|
||||
BuildRequires: pango-devel
|
||||
%if 0%{?suse_version}
|
||||
@ -74,6 +77,19 @@ make
|
||||
make DESTDIR=$RPM_BUILD_ROOT install-strip
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/
|
||||
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
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libfcitx-config.la
|
||||
|
||||
%find_lang %{name}
|
||||
@ -87,6 +103,14 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libfcitx-config.la
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS ChangeLog COPYING INSTALL README
|
||||
%doc %{_datadir}/doc/fcitx/
|
||||
%doc $RPM_SOURCE_DIR/fcitx-README.suse
|
||||
%doc $RPM_SOURCE_DIR/xim.fcitx.suse.template
|
||||
%dir /etc/X11/xim.d
|
||||
%dir /etc/X11/xim.d/en
|
||||
%dir /etc/X11/xim.d/zh_CN
|
||||
/etc/X11/xim.d/fcitx
|
||||
/etc/X11/xim.d/en/30-fcitx
|
||||
/etc/X11/xim.d/zh_CN/30-fcitx
|
||||
%dir %{_datadir}/fcitx
|
||||
%dir %{_datadir}/fcitx/data
|
||||
%dir %{_datadir}/fcitx/skin
|
||||
|
48
xim.d-fcitx
Normal file
48
xim.d-fcitx
Normal file
@ -0,0 +1,48 @@
|
||||
OLD_PATH=$PATH
|
||||
PATH=/usr/bin:/usr/X11R6/bin:/opt/kde3/bin:$PATH
|
||||
|
||||
if ! type -p fcitx > /dev/null 2>&1 ; then
|
||||
echo "fcitx is not available."
|
||||
PATH=$OLD_PATH
|
||||
return 1
|
||||
fi
|
||||
|
||||
#when skim installed, Autostart must be "false".
|
||||
#here we move $HOME/.kde/share/config/skimrc to skimrc.orig.fcitx
|
||||
case "$WINDOWMANAGER" in
|
||||
*kde*)
|
||||
if type -p skim > /dev/null 2>&1 \
|
||||
&& ! grep -i -q "^[[:space:]]*Autostart.*=.*false" $HOME/.kde/share/config/skimrc
|
||||
then
|
||||
if [ -f $HOME/.kde/share/config/skimrc.orig.fcitx ] ; then
|
||||
mv -f $HOME/.kde/share/config/skimrc $HOME/.kde/share/config/skimrc.orig.fcitx
|
||||
chmod 777 $HOME/.kde/share/config/skimrc.orig.fcitx
|
||||
fi
|
||||
cat > $HOME/.kde/share/config/skimrc << __END
|
||||
[General]
|
||||
Autostart=false
|
||||
__END
|
||||
chmod 777 $HOME/.kde/share/config/skimrc
|
||||
else
|
||||
# do nothing
|
||||
:
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# do nothing
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
export LC_CTYPE=$LANG
|
||||
# So you can use either zh_CN.UTF-8 or zh_CN.GB2312
|
||||
export XMODIFIERS="@im=fcitx"
|
||||
export GTK_IM_MODULE=xim
|
||||
export QT_IM_SWITCHER=imsw-multi
|
||||
export QT_IM_MODULE=xim
|
||||
fcitx -d
|
||||
|
||||
PATH=$OLD_PATH
|
||||
|
||||
# success:
|
||||
return 0
|
14
xim.fcitx.suse.template
Normal file
14
xim.fcitx.suse.template
Normal file
@ -0,0 +1,14 @@
|
||||
#~/.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
|
||||
|
Loading…
Reference in New Issue
Block a user