From 678e9c6a30376ffbe19326917a6a992ae89a5f7c Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Wed, 14 Jan 2009 06:28:21 +0000 Subject: [PATCH] Add python support --- import.log | 1 + libchewing.spec | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/import.log b/import.log index 47b7d05..3e98505 100644 --- a/import.log +++ b/import.log @@ -3,3 +3,4 @@ libchewing-0_3_1-0_fc9:HEAD:libchewing-0.3.1-0.fc9.src.rpm:1223448249 libchewing-0_3_2-0_fc9:HEAD:libchewing-0.3.2-0.fc9.src.rpm:1228279004 libchewing-0_3_2-1_fc10:HEAD:libchewing-0.3.2-1.fc10.src.rpm:1229994594 libchewing-0_3_2-2_fc10:HEAD:libchewing-0.3.2-2.fc10.src.rpm:1230010807 +libchewing-0_3_2-3_fc10:HEAD:libchewing-0.3.2-3.fc10.src.rpm:1231914268 diff --git a/libchewing.spec b/libchewing.spec index 170b820..724394f 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -1,6 +1,7 @@ + Name: libchewing Version: 0.3.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Group: System Environment/Libraries @@ -18,6 +19,9 @@ Source: http://chewing.csie.net/download/libchewing/%{name}-%{version}.t #Patch8: libchewing-0.3.0-11.bz195416.patch Patch9: libchewing-0.3.2.bz477690.patch +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%define libchewing_python_dir %{python_sitearch}/%{name} + BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libtool @@ -58,7 +62,8 @@ make LIBINSTDIR="\"%{_libdir}\"" %install rm -rf $RPM_BUILD_ROOT make DESTDIR=%{buildroot} install - +mkdir -p $RPM_BUILD_ROOT%{libchewing_python_dir} +cp python/chewing.py $RPM_BUILD_ROOT%{libchewing_python_dir} rm $RPM_BUILD_ROOT%{_libdir}/libchewing.la %post -p /sbin/ldconfig @@ -75,6 +80,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/chewing/* %{_libdir}/*.so.* %{_libdir}/chewing +%{libchewing_python_dir} %files devel %defattr(-, root, root) @@ -84,6 +90,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Thu Jan 14 2009 Ding-Yi Chen - 0.3.2-3 +- Add python binding by copy python/chewing.py to + /site_packages/libchewing + * Tue Dec 23 2008 Ding-Yi Chen - 0.3.2-2 - [Bug 477690] libchewing multilib conflict Move /usr/share/chewing/fonetree.dat to corresponding libdir.