%{!?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 ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@ Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Release: 1%{?dist} Summary: IBus template project License: GPLv2+ Group: System Environment/Libraries URL: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source1: http://scim-python.googlecode.com/files/pinyin-database-0.1.10.5.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: gettext-devel, libtool, python-devel, pygtk2-devel, perl(XML::Parser) gtk2-devel qt-devel Requires: pygtk2 %description PinYin engine for IBus input framework. %prep %setup -q cp %{SOURCE1} engine %build %configure --disable-static # make -C po update-gmo make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=${RPM_BUILD_ROOT} NO_INDEX=true install # %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %post cd /usr/share/ibus-pinyin/engine python -c "import pysqlitedb; db = pysqlitedb.PYSQLiteDB (); db.create_indexes ();" >/dev/null %files # -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README # %dir %{python_sitearch}/ibus # %{python_sitearch}/ibus/* %dir %{_datadir}/ibus-pinyin %{_datadir}/ibus-pinyin/* %{_datadir}/ibus/engine/pinyin.engine %{_libexecdir}/ibus-engine-pinyin %{_libexecdir}/ibus-setup-pinyin %changelog * Wed Jun 25 2008 Huang Peng - @VERSION@-1 - The first version.