From 24d803f531c95a10da90ad7ef2bce31be13c7297 Mon Sep 17 00:00:00 2001 From: supercyper Date: Sun, 18 Apr 2010 02:09:49 +0000 Subject: [PATCH] Initial import --- .cvsignore | 1 + fcitx.spec | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + xinput-fcitx | 7 ++++ 4 files changed, 112 insertions(+) create mode 100644 fcitx.spec create mode 100644 xinput-fcitx diff --git a/.cvsignore b/.cvsignore index e69de29..034e6f0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +fcitx-20100410.tar.bz2 diff --git a/fcitx.spec b/fcitx.spec new file mode 100644 index 0000000..21ddcea --- /dev/null +++ b/fcitx.spec @@ -0,0 +1,103 @@ +%define svndate 20100410 +%define svnver 350 +%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/fcitx.conf + +Name: fcitx +Summary: Free Chinese Input Toy for X (XIM) +Version: 3.6.3 +Release: 2.%{?svndate}svn_utf8%{?dist} +# fcitx itself is licensed under GPLv2+ +# lib/*, /src/IC.c and /src/IC.h are licensed under MIT +# src/uthash.h is licensed under BSD +License: GPLv2+ and MIT and BSD +Group: System Environment/Libraries +URL: http://code.google.com/p/%{name}/ +# +# The upstream svn trunk and the released tar ball are in GBK coding. We use the +# UTF-8 branch. And upstream has planned to move to UTF-8 coding in some future +# release. +# +#Source0: http://%{name}.googlecode.com/files/%name-%version.tar.bz2 +# The source for this package was pulled from upstream's vcs. Use the +# following commands to generate the tarball: +# svn export -r %{svnver} http://fcitx.googlecode.com/svn/branches/fcitx-utf8 fcitx-%{svndate} +# tar -cjvf fcitx-%{svndate}.tar.bz2 fcitx-%{svndate} +Source0: %{name}-%{svndate}.tar.bz2 +Source1: xinput-%{name} +BuildRequires: autoconf automake +BuildRequires: gettext-devel +BuildRequires: libXtst-devel +BuildRequires: libXft-devel +BuildRequires: libXpm-devel +BuildRequires: libXext-devel +BuildRequires: dbus-devel +Requires: im-chooser +Requires(post): %{_sbindir}/alternatives +Requires(postun): %{_sbindir}/alternatives + +%description +Fcitx(Free Chinese Input Toy of X) is a collection of Simplified Chinese +input methods for Linux. It supports Pinyin, QuWei and Table-based input +methods. It's small and fast. + +This package is the UTF-8 branch of fcitx. + +%prep +%setup -q -n %{name}-%{svndate} + +%build +# fix DSOLinking +sed -i -e 's/fcitx_LDFLAGS =/fcitx_LDFLAGS = -ldl -lXext/g' src/Makefile.am +./autogen.sh +%configure --enable-dbus +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} + +make install INSTALL="install -p" DESTDIR=%{buildroot} + +#fix doc path +mkdir __doc +mv %{buildroot}%{_datadir}/%{name}/doc/* __doc +rm -rf %{buildroot}%{_datadir}/%{name}/doc +rm -f __doc/{API.txt,Develop_Readme*,fcitx_trunk.doxyfile} + +# install xinput config file +install -pm 644 -D %{SOURCE1} %{buildroot}%{_xinputconf} + +chmod 0755 %{buildroot}%{_datadir}/%{name}/tools/winmb2fcitx.py + +%clean +rm -rf %{buildroot} + +%post +%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 55 || : + +%postun +if [ "$1" = "0" ]; then + %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || : + # if alternative was set to manual, reset to auto + [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || : +fi + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING README THANKS TODO +%doc __doc/* +%exclude %{_datadir}/%{name}/data/*.txt +%exclude %{_datadir}/%{name}/data/*.org +# winmb2fcitx.py is a utility script, byte-compilation is useless. +%exclude %{_datadir}/%{name}/tools/winmb2fcitx.pyc +%exclude %{_datadir}/%{name}/tools/winmb2fcitx.pyo +%config %{_xinputconf} +%{_bindir}/* +%{_datadir}/%{name} + +%changelog +* Sat Apr 17 2010 Chen Lei - 3.6.3-2.20100410svn_utf8 +- Update License tag +- Add more explanation for UTF-8 branch + +* Mon Apr 12 2010 Chen Lei - 3.6.3-1.20100410svn_utf8 +- Initial Package diff --git a/sources b/sources index e69de29..e392fb8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b2f08f13936566ec09a1c3ee5a908b64 fcitx-20100410.tar.bz2 diff --git a/xinput-fcitx b/xinput-fcitx new file mode 100644 index 0000000..2e2b5b0 --- /dev/null +++ b/xinput-fcitx @@ -0,0 +1,7 @@ +XIM=fcitx +XIM_PROGRAM=/usr/bin/fcitx +ICON="/usr/share/fcitx/xpm/Logo.png" +XIM_ARGS="-D" +SHORT_DESC="Fcitx" +GTK_IM_MODULE=xim +QT_IM_MODULE=xim