--- /dev/null
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+# %define mod_path scim-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@
+Name: ibus
+Version: @PACKAGE_VERSION@
+Release: 1%{?dist}
+Summary: Input bus for Linux OS
+License: LGPLv2+
+Group: System Environment/Libraries
+URL: http://code.google.com/p/ibus/
+Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: gettext-devel, libtool, python-devel, pygtk2-devel, perl(XML::Parser) gtk2-devel qt-devel
+Requires: pygtk2
+
+%description
+Input bus for Linux OS
+
+%package gtk
+Summary: IBus im module for gtk2
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description gtk
+This package contains ibus im module for gtk2
+
+%package qt
+Summary: IBus im module for qt4
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description qt
+This package contains ibus im module for qt4
+
+%package enchant
+Summary: IBus enchant engine
+Group: System Environment/Libraries
+BuildRequires: python-enchant
+Requires: %{name} = %{version}-%{release} python-enchant
+
+%description enchant
+This package contains an enchant IM engine.
+
+%package anthy
+Summary: Anthy japanese IM engine
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release} anthy
+
+%description anthy
+This package contains the anthy IM engine
+
+
+Requires: %{name}-xingma = %{version}-%{release}
+
+%prep
+%setup -q
+
+%build
+%configure --disable-static
+# make -C po update-gmo
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=${RPM_BUILD_ROOT} install
+rm -f $RPM_BUILD_ROOT%{python_sitearch}/_anthy.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/immodules/im-ibus.la
+
+# %find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+# -f %{name}.lang
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING README
+%dir %{python_sitearch}/ibus
+%{python_sitearch}/ibus/*
+%dir %{_datadir}/ibus/
+%dir %{_datadir}/ibus/ibusdaemon/
+%dir %{_datadir}/ibus/panel/
+%dir %{_datadir}/ibus/engine/
+%dir %{_datadir}/ibus/icons/
+%{_datadir}/ibus/ibusdaemon/*
+%{_datadir}/ibus/panel/*
+%{_datadir}/ibus/engine/*
+%{_datadir}/ibus/icons/*
+%{_libexecdir}/ibus-daemon
+%{_libexecdir}/ibus-panel
+
+%files gtk
+%{_libdir}/gtk-2.0/immodules/im-ibus.so
+
+%files qt
+%{_libdir}/qt4/plugins/inputmethods/libibus.so
+
+%files enchant
+%dir %{_datadir}/ibus/engine/enchant
+%{_datadir}/ibus/engine/enchant/*
+%{_libexecdir}/ibus-engine-enchant
+
+%files anthy
+%{python_sitearch}/_anthy.so
+%{python_sitearch}/anthy.*
+%dir %{_datadir}/ibus/engine/anthy
+%{_datadir}/ibus/engine/anthy/*
+%{_libexecdir}/ibus-engine-anthy
+
+%changelog
+* Wed Jun 25 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.0-1
+- The first version.