|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
%global name_zh_TW %{im_name_zh_TW}函式庫
|
|
|
|
|
Name: libchewing
|
|
|
|
|
Version: 0.3.4
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: Intelligent phonetic input method library for Traditional Chinese
|
|
|
|
|
Summary(zh_TW): %{name_zh_TW}
|
|
|
|
|
|
|
|
|
@ -10,6 +10,7 @@ Group: System Environment/Libraries
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
URL: http://chewing.csie.net/
|
|
|
|
|
Source0: http://chewing.googlecode.com/files/%{name}-%{version}.tar.bz2
|
|
|
|
|
Source1: https://raw.github.com/chewing/%{name}/v%{version}/contrib/python/chewing.py
|
|
|
|
|
#Patch0: libchewing-0.3.0-3.bz199353.patch
|
|
|
|
|
#Patch1: libchewing-0.3.0-4.bz206232.patch
|
|
|
|
|
#Patch2: libchewing-0.3.0-5.bz216581a.patch
|
|
|
|
@ -27,14 +28,18 @@ Source0: http://chewing.googlecode.com/files/%{name}-%{version}.tar.bz2
|
|
|
|
|
# Rhbz#625980
|
|
|
|
|
#Patch14: libchewing-0.3.2.align.patch
|
|
|
|
|
# RHBZ$477690
|
|
|
|
|
Patch15: libchewing-0.3.3.multilibConflict.patch
|
|
|
|
|
#Patch15: libchewing-0.3.3.multilibConflict.patch
|
|
|
|
|
Patch16: libchewing-0.3.4.asprintf.patch
|
|
|
|
|
Patch17: libchewing-0.3.4.tsiMissing.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
|
%global libchewing_python_dir %{python_sitearch}/%{name}
|
|
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
BuildRequires: autoconf automake libtool pkgconfig
|
|
|
|
|
BuildRequires: autoconf automake libtool pkgconfig gawk
|
|
|
|
|
Requires(post): info
|
|
|
|
|
Requires(preun): info
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
libchewing is an intelligent phonetic input method library for Chinese.
|
|
|
|
@ -65,7 +70,7 @@ library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n %{name}-python
|
|
|
|
|
Summary: libchewing python binding
|
|
|
|
|
Summary: Python binding for libchewing
|
|
|
|
|
Summary(zh_TW): %{name_zh_TW} python 綁定
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
@ -80,22 +85,26 @@ Python binding of libchewing.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
#%patch0 -p1 -b .1-bz199353
|
|
|
|
|
#%patch1 -p1 -b .2-bz206232
|
|
|
|
|
#%patch2 -p1 -b .3-bz216581a
|
|
|
|
|
#%patch3 -p1 -b .4-bz216581b
|
|
|
|
|
#%patch4 -p1 -b .5-bz231568
|
|
|
|
|
#%patch5 -p1 -b .6-bz237233
|
|
|
|
|
#%patch6 -p1 -b .7-bz237916
|
|
|
|
|
#%patch7 -p1 -b .8-bz200694
|
|
|
|
|
#%patch8 -p1 -b .9-bz195416
|
|
|
|
|
#%patch9 -p0 -b .bz477690
|
|
|
|
|
#%patch10 -p0 -b .phraseChoiceRearward
|
|
|
|
|
#%patch11 -p0 -b .chewing_zuin
|
|
|
|
|
#%patch12 -p0 -b .hsu
|
|
|
|
|
#%patch13 -p0 -b .hsu.2
|
|
|
|
|
#%patch14 -p0 -b .align
|
|
|
|
|
%patch15 -p0 -b .multilibConflict
|
|
|
|
|
#%%patch0 -p1 -b .1-bz199353
|
|
|
|
|
#%%patch1 -p1 -b .2-bz206232
|
|
|
|
|
#%%patch2 -p1 -b .3-bz216581a
|
|
|
|
|
#%%patch3 -p1 -b .4-bz216581b
|
|
|
|
|
#%%patch4 -p1 -b .5-bz231568
|
|
|
|
|
#%%patch5 -p1 -b .6-bz237233
|
|
|
|
|
#%%patch6 -p1 -b .7-bz237916
|
|
|
|
|
#%%patch7 -p1 -b .8-bz200694
|
|
|
|
|
#%%patch8 -p1 -b .9-bz195416
|
|
|
|
|
#%%patch9 -p0 -b .bz477690
|
|
|
|
|
#%%patch10 -p0 -b .phraseChoiceRearward
|
|
|
|
|
#%%patch11 -p0 -b .chewing_zuin
|
|
|
|
|
#%%patch12 -p0 -b .hsu
|
|
|
|
|
#%%patch13 -p0 -b .hsu.2
|
|
|
|
|
#%%patch14 -p0 -b .align
|
|
|
|
|
#%%patch15 -p0 -b .multilibConflict
|
|
|
|
|
%patch16 -p0 -b .asprintf
|
|
|
|
|
%patch17 -p0 -b .tsiMissing
|
|
|
|
|
mkdir -p contrib/python
|
|
|
|
|
cp %SOURCE1 contrib/python
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
export CFLAGS=-DLIBINSTDIR='\"%{_libdir}\" -g'
|
|
|
|
@ -107,12 +116,19 @@ autoreconf -ivf
|
|
|
|
|
%{__make} DESTDIR=%{buildroot} install
|
|
|
|
|
%{__rm} %{buildroot}%{_libdir}/libchewing.la
|
|
|
|
|
%{__mkdir} -p %{buildroot}%{libchewing_python_dir}
|
|
|
|
|
%{__cp} python/chewing.py %{buildroot}%{libchewing_python_dir}
|
|
|
|
|
%{__cp} contrib/python/chewing.py %{buildroot}%{libchewing_python_dir}
|
|
|
|
|
%{__mkdir} -p %{buildroot}%{_libdir}/chewing
|
|
|
|
|
%{__cp} data/fonetree.dat %{buildroot}%{_libdir}/chewing
|
|
|
|
|
touch %{buildroot}%{libchewing_python_dir}/__init__.py
|
|
|
|
|
rm -f %{buildroot}/%{_infodir}/dir
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
%post
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ $1 = 0 ] ; then
|
|
|
|
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
@ -121,10 +137,10 @@ touch %{buildroot}%{libchewing_python_dir}/__init__.py
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
%doc README AUTHORS COPYING
|
|
|
|
|
%dir %{_datadir}/chewing
|
|
|
|
|
%{_datadir}/chewing/*
|
|
|
|
|
%dir %{_libdir}/libchewing
|
|
|
|
|
%{_libdir}/libchewing/*
|
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
%{_libdir}/chewing
|
|
|
|
|
%{_infodir}/libchewing.info.gz
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-, root, root)
|
|
|
|
@ -138,9 +154,15 @@ touch %{buildroot}%{libchewing_python_dir}/__init__.py
|
|
|
|
|
%{libchewing_python_dir}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 07 2013 Ding-Yi Chen <dchen at redhat dot com> - 0.3.4-2
|
|
|
|
|
- Fix RPM build.
|
|
|
|
|
|
|
|
|
|
* Fri Jan 11 2013 Ding-Yi Chen <dchen at redhat dot com> - 0.3.4-1
|
|
|
|
|
- Upstream update to 0.3.4
|
|
|
|
|
- Download is changed to Google Code.
|
|
|
|
|
- /usr/share/chewing is removed, data files now located in
|
|
|
|
|
/usr/lib(64)/libchewing
|
|
|
|
|
- Info for libchewing is included.
|
|
|
|
|
|
|
|
|
|
* Thu Nov 22 2012 Ding-Yi Chen <dchen at redhat dot com> - 0.3.3-5
|
|
|
|
|
- RPM Macro: define is replaced by global.
|
|
|
|
|