SHA256
1
0
forked from pool/fcitx

Accepting request 81797 from home:hillwood

OBS-URL: https://build.opensuse.org/request/show/81797
OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=6
This commit is contained in:
Xing Yin 2011-09-13 03:44:06 +00:00 committed by Git OBS Bridge
parent d9cfc5674c
commit 6fd388c411
8 changed files with 243 additions and 266 deletions

View File

@ -1,62 +0,0 @@
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/

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Exec=fcitx-config
GenericName=Fcitx Configuration Tool
GenericName[zh_CN]=Fcitx
Comment=Fcitx GUI Config Tool
Comment[zh_CN]=Fcitx
Name=Fcitx Config Tool
Name[zh_CN]=Fcitx
Icon=fcitx
StartupNotify=true
Type=Application
Categories=Settings;Utility;X-SuSE-DesktopUtility;

View File

@ -1,16 +0,0 @@
[Desktop Entry]
Name=Fcitx Kimpanel
Name[zh_CN]=Fcitx (使Kimpanel)
Comment=Chinese Input Method (Use Kimpanel)
Comment[zh_CN]= (使 Kimpanel)
Exec=fcitx -u fcitx-kimpanel-ui
Icon=fcitx
Terminal=false
Type=Application
Categories=System;Utility;X-SuSE-DesktopUtility;
StartupNotify=false
X-GNOME-Autostart-Phase=Applications
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false

View File

@ -1,25 +0,0 @@
-------------------------------------------------------------------
* Fri Sep 9 15:02:04 UTC 2011 stecue <stecue@gmail.com>
- upstream version 4.1.1
-------------------------------------------------------------------
* Wed Sep 7 19:49:14 UTC 2011 stecue <stecue@gmail.com>
- upstream version 4.1.0
-------------------------------------------------------------------
* Tue Jun 14 00:56:36 UTC 2011 swyear <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.
- Add xim dependency for openSUSE 11.4
-------------------------------------------------------------------
* Sat Sep 18 00:00:00 UTC 2010 CSSlayer <wengxt@gmail.com>
- Make it works with newest
-------------------------------------------------------------------
* Fri Jun 11 00:00:00 UTC 2004 xyb <xyb76@sina.com>
- Add data/tables.conf
-------------------------------------------------------------------
* Mon Feb 2 00:00:00 UTC 2004 xyb <xyb76@sina.com>
- Fix spec bug(patch by hamigua).
-------------------------------------------------------------------
* Thu Jan 15 00:00:00 UTC 2004 xyb <xyb76@sina.com>
- skeleton RPM

View File

@ -1,17 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=Fcitx
Name[zh_CN]=Fcitx
GenericName=Free Chinese Input Toy of X
GenericName[zh_CN]=Free Chinese Input Toy of X
Comment=Chinese Input Method
Comment[zh_CN]=
Exec=fcitx
Icon=fcitx
Terminal=false
Type=Application
Categories=Settings;Utility;X-SuSE-DesktopUtility;
X-GNOME-Autostart-Phase=Applications
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=true
X-KDE-autostart-after=panel

View File

@ -1,163 +1,276 @@
%define name fcitx
%define version 4.1.1
%define release 2
%define prefix /usr
%define fcitxbindir /usr/bin
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Free Chinese Input Toy for X (XIM)
URL: http://www.fcitx.org/
Group: System/I18n/Chinese
License: GPL
Source0: %{name}-%{version}_all.tar.bz2
Source1: %{name}.desktop
Source2: %{name}-configtool.desktop
Source3: %{name}-kimpanel.desktop
Source4: xim.d-fcitx
Source5: fcitx-README.suse
Source6: xim.fcitx.suse.template
BuildRequires: gcc-c++ cmake libicu-devel xorg-x11-libX11-devel
BuildRequires: cairo-devel
Name: fcitx
Version: 4.1.1
Release: 1
Summary: Free Chinese Input Toy for X (XIM)
Packager: hillwood <hillwood@linuxfans.org>
URL: http://www.fcitx.org/
Group: System Environment/Libraries
License: GPL
Source: %{name}-%{version}_all.tar.bz2
Source1: xim.d-fcitx
Source2: xinput-fcitx.conf
BuildRequires: cairo-devel
BuildRequires: pango-devel
%if 0%{?suse_version}
#patch: catagories.patch
BuildRequires: dbus-1-devel dbus-1-glib-devel
Requires: dbus-1 dbus-1-glib
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: update-desktop-files
BuildRequires: libqt4-devel
%else
BuildRequires: dbus-devel dbus-glib-devel
Requires: dbus-1 dbus-glib
BuildRequires: dbus-devel
BuildRequires: dbus-glib-devel
BuildRequires: qt-devel
%endif
Requires: libicu
%if 0%{?suse_version} >= 1140
Requires: gtk2-immodule-xim
#Obsoletes: gtk2-immodule-amharic
#Obsoletes: gtk2-immodule-thai
#Obsoletes: gtk2-immodule-vietnamese
#Obsoletes: gtk2-immodules-tigrigna
#Obsoletes: gtk2-immodule-inuktitut
#Obsoletes: gtk2-immodule-multipress
BuildRequires: intltool
BuildRequires: cmake
BuildRequires: gtk2-devel
%if 0%{?suse_version} > 1130
BuildRequires: gtk3-devel
%endif
BuildRequires: intltool
BuildRequires: libtool
#BuildRequires: wget
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%if 0%{?fedora} > 14
BuildRequires: gtk3-devel
%endif
BuildRequires: gcc-c++
BuildRequires: libicu-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%description
FCITX is a simplified Chinese input server. It supports Tables,
Pinyin and QuWei input method. It's small and fast.
%description -l zh_CN
Fcitx──小企鹅输入法即Free Chinese Input Toy for X它是一个以GPL方式
发布的、基于XIM的简体中文输入法(即原来的G五笔),包括码表、全拼拼音、双拼
拼音输入法,并可运行在Linux及其它类UNIX平台上。
Designed by Yuking <yuking_net@suho.com>
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
%if 0%{?suse_version}
Requires: xorg-x11-libX11-devel
%else
Requires: libX11-devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: fcitx = %{version}-%{release}
%description devel
The %{name}-devel package includes the header files for the %{name} package.
%package gtk2
Summary: Gtk2 IM Module for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk2-immodule-xim
%description gtk2
This package contains %{name} im module for gtk2
%if 0%{?suse_version} > 1130
%package gtk3
Summary: Gtk3 IM Module for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk3-immodule-xim
%description gtk3
This package contains %{name} im module for gtk3
%endif
%if 0%{?fedora} > 14
%package gtk3
Summary: Gtk3 IM Module for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk3-immodule-xim
%description gtk3
This package contains %{name} im module for gtk3
%endif
%description devel
The %{name}-devel package includes the header files for the FCITX package.
%package qt4
Summary: Qt4 IM Module for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description qt4
This package contains %{name} im module for qt4
%prep
%setup -q
%setup -q -n %{name}-%{version}
%build
mkdir build
cd build
cmake .. -DENABLE_GTK3_IM_MODULE=off -DENABLE_QT_IM_MODULE=off -DENABLE_GTK2_IM_MODULE=off -DCMAKE_INSTALL_PREFIX=%{prefix} -DLIB_INSTALL_DIR=%{_libdir}
make
%if 0%{?suse_version}
%if 0%{?suse_version} < 1140
cmake .. -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 \
-DENABLE_QT_IM_MODULE=On \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir}
%endif
%endif
%if 0%{?fedora}
%if 0%{?fedora} < 15
cmake .. -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 \
-DENABLE_QT_IM_MODULE=On \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir}
%endif
%endif
%if 0%{?centos_version}
cmake .. -DENABLE_GTK3_IM_MODULE=off \
-DENABLE_QT_IM_MODULE=On \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir}
%endif
%if 0%{?rhel_version}
cmake .. -DENABLE_GTK3_IM_MODULE=off \
-DENABLE_QT_IM_MODULE=On \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir}
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
cd build
make DESTDIR=%{buildroot} install
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/applications/
make DESTDIR=$RPM_BUILD_ROOT install
cd ..
rm $RPM_BUILD_ROOT/usr/share/doc/ -r
%if 0%{?suse_version}
%suse_update_desktop_file fcitx Utility DesktopUtility
%suse_update_desktop_file fcitx-kimpanel Utility DesktopUtility
%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}
#%files -f %{name}.lang
%files
%if 0%{?suse_version}
%post gtk2
touch var/adm/SuSEconfig/run-gtk
/sbin/SuSEconfig --module gtk2
%postun gtk2
touch var/adm/SuSEconfig/run-gtk
/sbin/SuSEconfig --module gtk2
%if 0%{?suse_version} > 1130
%post gtk3
/sbin/ldconfig
%ifarch x86_64
gtk-query-immodules-3.0-64 > /usr/lib64/gtk-3.0/3.0.0/immodules.cache
%else
gtk-query-immodules-3.0 > /usr/lib/gtk-3.0/3.0.0/immodules.cache
%endif
%endif
%endif
%files -f %{name}.lang
%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 %{_libdir}/fcitx
%dir %{_datadir}/fcitx
%dir %{_datadir}/fcitx/data
%dir %{_datadir}/fcitx/skin
%{_bindir}/%{name}
%{_bindir}/%{name}-configtool
%{_bindir}/%{name}-remote
%{_bindir}/%{name}4-config
%{_datadir}/%{name}/addon/*
%{_datadir}/%{name}/configdesc/*
%{_datadir}/%{name}/data/*
%{_datadir}/%{name}/pinyin/*
%{_datadir}/%{name}/table/*
#%{_datadir}/doc/%{name}/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/*
%{_mandir}/man1/*.gz
%dir %{_datadir}/fcitx/addon
%dir %{_datadir}/fcitx/configdesc
%dir %{_datadir}/fcitx/data
%dir %{_datadir}/fcitx/pinyin
%dir %{_datadir}/fcitx/table
%{_bindir}/*
%{_datadir}/locale/zh_CN/LC_MESSAGES/fcitx.mo
%{_datadir}/applications/fcitx*
#%{_datadir}/pixmaps/*
%{_datadir}/fcitx/data/*
%{_datadir}/fcitx/skin/*
%{_datadir}/fcitx/addon/*
%{_datadir}/fcitx/configdesc/*
%{_datadir}/fcitx/pinyin/*
%{_datadir}/fcitx/table/*
%{_datadir}/icons/*
%dir %{_libdir}/fcitx
%dir %{_datadir}/fcitx
%{_libdir}/fcitx/*.so
%{_libdir}/libfcitx*.so.*
%{_mandir}/man1/createPYMB.1.gz
%{_mandir}/man1/fcitx-remote.1.gz
%{_mandir}/man1/fcitx.1.gz
%{_mandir}/man1/mb2org.1.gz
%{_mandir}/man1/mb2txt.1.gz
%{_mandir}/man1/readPYBase.1.gz
%{_mandir}/man1/readPYMB.1.gz
%{_mandir}/man1/scel2org.1.gz
%{_mandir}/man1/txt2mb.1.gz
%{_bindir}/createPYMB
%{_bindir}/mb2org
%{_bindir}/mb2txt
%{_bindir}/readPYBase
%{_bindir}/readPYMB
%{_bindir}/scel2org
%{_bindir}/txt2mb
%dir %{_datadir}/%{name}/skin
%{_datadir}/%{name}/skin/default
%{_datadir}/%{name}/skin/dark
%{_datadir}/%{name}/skin/classic
%if 0%{?suse_version}
%dir /etc/X11/xim.d
/etc/X11/xim.d/*
%else
%dir /etc/X11/xinit/xinput.d
/etc/X11/xinit/xinput.d/fcitx.conf
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files gtk2
%defattr(-,root,root,-)
%{_libdir}/gtk-2.0/*
%if 0%{?suse_version} > 1130
%files gtk3
%defattr(-,root,root,-)
%{_libdir}/gtk-3.0/*
%endif
%if 0%{?fedora} > 14
%files gtk3
%defattr(-,root,root,-)
%{_libdir}/gtk-3.0/*
%endif
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_libdir}/libfcitx*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/cmake/*
%{_datadir}/cmake/
%{_includedir}/*
%files qt4
%defattr(-,root,root,-)
%{_libdir}/qt4/*
%changelog
* Sat Sep 10 2011 hillwood <hillwood@linuxfans.org>
- add gtk2-immodule-xim and gtk3-immodule-xim require
* Fri Sep 9 2011 hillwood <hillwood@linuxfans.org>
- update to 4.1.1
* Mon Sep 5 2011 hillwood <hillwood@linuxfans.org>
- update to 4.1.0.
* Thu May 17 2011 hillwood <hillwood@linuxfans.org>
- add gtk-immodule-xim require
* Mon Mar 14 2011 hillwood <hillwood@linuxfans.org>
- first package for 4.0.1

View File

@ -1,14 +0,0 @@
#~/.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

10
xinput-fcitx.conf Normal file
View File

@ -0,0 +1,10 @@
# /etc/X11/xinit/xinput.d/fcitx.conf
XIM=fcitx
XIM_PROGRAM=/usr/bin/fcitx
ICON="/usr/share/pixmaps/fcitx.png"
XIM_ARGS="-D"
PREFERENCE_PROGRAM=/usr/bin/fcitx-configtool
SHORT_DESC="FCITX"
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx