fa7857b
%define im_name_zh_TW 新酷音輸入法
fa7857b
%define name_zh_TW %{im_name_zh_TW}函式庫
97a7d9f
Name:           libchewing
b106bf1
Version:        0.3.2
fa7857b
Release:        17%{?dist}
97a7d9f
Summary:        Intelligent phonetic input method library for Traditional Chinese
fa7857b
Summary(zh_TW): %{name_zh_TW}
97a7d9f
97a7d9f
Group:          System Environment/Libraries
97a7d9f
License:        LGPLv2+
97a7d9f
URL:            http://chewing.csie.net/
b106bf1
Source:         http://chewing.csie.net/download/libchewing/%{name}-%{version}.tar.bz2
97a7d9f
#Patch0: libchewing-0.3.0-3.bz199353.patch
97a7d9f
#Patch1: libchewing-0.3.0-4.bz206232.patch
97a7d9f
#Patch2: libchewing-0.3.0-5.bz216581a.patch
97a7d9f
#Patch3: libchewing-0.3.0-5.bz216581b.patch
97a7d9f
#Patch4: libchewing-0.3.0-6.bz231568.patch
97a7d9f
#Patch5: libchewing-0.3.0-7.bz237233.patch
97a7d9f
#Patch6: libchewing-0.3.0-8.bz237916.patch
97a7d9f
#Patch7: libchewing-0.3.0-9.bz200694.patch
97a7d9f
#Patch8: libchewing-0.3.0-11.bz195416.patch
2d53c6b
Patch9: libchewing-0.3.2.bz477690.patch
6e0e80c
Patch10: libchewing-0.3.2.phraseChoiceRearward.patch
8bcf099
Patch11: libchewing-0.3.2.chewing_zuin.patch
97a7d9f
678e9c6
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
678e9c6
%define libchewing_python_dir %{python_sitearch}/%{name}
678e9c6
97a7d9f
BuildRoot:     %{_tmppath}/%{name}-%{version}-root
6e0e80c
BuildRequires:  autoconf automake libtool pkgconfig
3bcc798
3bcc798
%description
3bcc798
libchewing is an intelligent phonetic input method library for Chinese.
3bcc798
3bcc798
It provides the core algorithm and logic that can be used by various
3bcc798
input methods.  The Chewing input method is a smart bopomofo phonetics
3bcc798
input method that is useful for inputting Mandarin Chinese.
3bcc798
fa7857b
%description -l zh_TW
fa7857b
%{name_zh_TW}提供實做了核心選字演算法,以便輸入法程式調用。
fa7857b
fa7857b
%{im_name_zh_TW}是一種智慧型注音/拼音猜字輸入法,透過智慧型的字庫分析、習慣記錄學習與預測分析,
fa7857b
使拼字輸入的人為選字機率降至最低,進而提升中文輸入、打字的效率。
3bcc798
cchance 1ea3e19
%package -n %{name}-devel
97a7d9f
Summary:        Development files for libchewing
fa7857b
Summary(zh_TW): %{name_zh_TW}開發者套件
97a7d9f
Group:          Development/Libraries
97a7d9f
Requires:       %{name} = %{version}-%{release}, pkgconfig
3bcc798
3bcc798
%description -n %{name}-devel
fa7857b
Headers and other files needed to develop applications using the %{name}
97a7d9f
library.
3bcc798
fa7857b
%description -l zh_TW  -n %{name}-devel
fa7857b
%{name_zh_TW}開發者套件提供了開發%{im_name_zh_TW}相關程式所需的檔案,
fa7857b
像是標頭檔(header files),以及函式庫。
fa7857b
fa7857b
fa7857b
%package -n %{name}-python
fa7857b
Summary:        libchewing python binding
fa7857b
Summary(zh_TW): %{name_zh_TW} python 綁定
fa7857b
Group:          Development/Libraries
fa7857b
BuildRequires:  python-devel
fa7857b
Requires:       %{name} = %{version}-%{release}
fa7857b
Requires:       python
fa7857b
fa7857b
%description -n %{name}-python
fa7857b
Python binding of libchewing.
fa7857b
fa7857b
%description -l zh_TW -n %{name}-python
fa7857b
%{name_zh_TW} python 綁定
fa7857b
3bcc798
%prep
3bcc798
%setup -q
97a7d9f
#%patch0 -p1 -b .1-bz199353
97a7d9f
#%patch1 -p1 -b .2-bz206232
97a7d9f
#%patch2 -p1 -b .3-bz216581a
97a7d9f
#%patch3 -p1 -b .4-bz216581b
97a7d9f
#%patch4 -p1 -b .5-bz231568
97a7d9f
#%patch5 -p1 -b .6-bz237233
97a7d9f
#%patch6 -p1 -b .7-bz237916
97a7d9f
#%patch7 -p1 -b .8-bz200694
97a7d9f
#%patch8 -p1 -b .9-bz195416
dfcb414
%patch9 -p0 -b .bz477690
42340c0
%patch10 -p0 -b .phraseChoiceRearward
8bcf099
%patch11 -p0 -b .chewing_zuin
3bcc798
3bcc798
%build
dfcb414
export CFLAGS=-DLIBINSTDIR='\"%{_libdir}\" -g'
6e0e80c
autoreconf -ivf
e2c71e2
%configure --disable-static
dfcb414
%{__make} RPM_CFLAGS="%{optflags}" %{_smp_mflags}
3bcc798
3bcc798
%install
fa7857b
rm -rf $RPM_BUILD_ROOT
dfcb414
%{__make} DESTDIR=%{buildroot} install
7c4f43a
rm $RPM_BUILD_ROOT%{_libdir}/libchewing.la
678e9c6
mkdir -p $RPM_BUILD_ROOT%{libchewing_python_dir}
678e9c6
cp python/chewing.py $RPM_BUILD_ROOT%{libchewing_python_dir}
bd01c96
mkdir -p $RPM_BUILD_ROOT%{_libdir}/chewing
bd01c96
cp data/fonetree.dat $RPM_BUILD_ROOT%{_libdir}/chewing
7c4f43a
touch $RPM_BUILD_ROOT%{libchewing_python_dir}/__init__.py
3bcc798
3bcc798
%post -p /sbin/ldconfig
3bcc798
3bcc798
%postun -p /sbin/ldconfig
3bcc798
3bcc798
%clean
3bcc798
rm -rf $RPM_BUILD_ROOT
3bcc798
3bcc798
%files
3bcc798
%defattr(-, root, root)
e2c71e2
%doc README AUTHORS COPYING
3bcc798
%dir %{_datadir}/chewing
3bcc798
%{_datadir}/chewing/*
2d53c6b
%{_libdir}/*.so.*
2d53c6b
%{_libdir}/chewing
3bcc798
3bcc798
%files devel
3bcc798
%defattr(-, root, root)
3bcc798
%dir %{_includedir}/chewing
3bcc798
%{_includedir}/chewing/*
3bcc798
%{_libdir}/pkgconfig/chewing.pc
3bcc798
%{_libdir}/*.so
3bcc798
fa7857b
%files python
fa7857b
%defattr(-, root, root)
fa7857b
%{libchewing_python_dir}
fa7857b
fa7857b
3bcc798
%changelog
fa7857b
* Tue Jan 05 2010 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-17
fa7857b
- Add zh_TW summary and description
fa7857b
- Split out python binding into a subpackage.
fa7857b
- Fix for package wrangler.
fa7857b
8bcf099
* Wed Sep 30 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-16
8bcf099
- Fix chewing Google issue 352: 
8bcf099
  zuin_count in chewing_zuin_String( ChewingContext *ctx, int *zuin_count ) 
8bcf099
  does not count correctly.
8bcf099
51c223e
* Mon Aug 03 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-15
51c223e
- Fix [Bug 512108:issue 11] ibus-chewing crash the application
51c223e
  by move cursor_orig to chewingio.c global.
51c223e
51c223e
* Thu Jul 30 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-14
f42a2fb
- Fix [Bug 512108] ibus-chewing crash the application
f42a2fb
17cd21f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-13
17cd21f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
17cd21f
ab88db9
* Tue Jun 30 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-12
ab88db9
- Rebuild to correct tags.
ab88db9
39c8a78
* Fri Jun 26 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-11
39c8a78
- Revise phraseChoiceRearward.patch so the cursor won't move to left
39c8a78
  when repeatly press down key.
39c8a78
6e0e80c
* Wed May 20 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-10
f42a2fb
- Need autoreconf and BuildRequires: pkgconfig to make changes in
39c8a78
  Makefile.am effective, thus actually fix [Bug 477960] libchewing multilib conflict.
6e0e80c
42340c0
* Mon May 18 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-9
42340c0
- Possible Fix of Bug 501220 - RFE: edit last preedit character from end of line
42340c0
  Chewing upstream does not handle if phrase choice rearward is enabled.
42340c0
dfcb414
* Wed Apr 22 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-8
dfcb414
- Fix [Bug 496968] - libchewing-debuginfo does not contain sources.
dfcb414
c9d1b51
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-7
c9d1b51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c9d1b51
bd01c96
* Fri Feb 20 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-6
bd01c96
- Fix [Bug 486409] - Wrong python binding installed path
bd01c96
  Add BuildRequires:  python-devel
bd01c96
34abd72
* Wed Feb 18 2009 Adam Jackson <ajax@redhat.com> 0.3.2-5
34abd72
- Rerun autotools so changes to Makefile.am actually take effect.
34abd72
7c4f43a
* Fri Jan 23 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-4
7c4f43a
- touch python-<ver>/site-packages/libchewing/__init__.py,
7c4f43a
  So python thinks libchewing is a library.
7c4f43a
678e9c6
* Thu Jan 14 2009 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-3
dfcb414
- Add python binding by copy python/chewing.py to
678e9c6
  <python_dir>/site_packages/libchewing
678e9c6
09a6181
* Tue Dec 23 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-2
2d53c6b
- [Bug 477690] libchewing multilib conflict
2d53c6b
  Move /usr/share/chewing/fonetree.dat to corresponding libdir.
dfcb414
b106bf1
* Wed Dec 03 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.3.2-0
b106bf1
- Upstream update to 0.3.2.
b106bf1
c0f9735
* Wed Oct 08 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.3.1-0
c0f9735
- Upstream update.
c0f9735
97a7d9f
* Wed Sep 17 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.3.0.901-0
97a7d9f
- Upstream update.
97a7d9f
e2176d9
* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.3.0-12
e2176d9
- fix license tag
e2176d9
cchance c69642f
* Tue Apr 22 2008 Caius Chance <cchance@redhat.com> - 0.3.0-11.fc10
cchance 10ec36a
- Resolves: rhbz195416 (Initial input mode between Chinese and English.)
cchance 10ec36a
cchance ef336a0
* Wed Feb 13 2008 Caius Chance <cchance@redhat.com> - 0.3.0-10.fc9
cchance ef336a0
- Rebuild for F9.
cchance ef336a0
cchance 94396ed
* Tue Jan 08 2008 Caius Chance <cchance@redhat.com> - 0.3.0-9.devel
cchance 94396ed
- Resolves: rhbz#200694 (Moving "Han-Yin" <-> Zhu-Yin" option to AUX UI.)
cchance 94396ed
cchance 1ea3e19
* Fri Jun 01 2007 Caius Chance <cchance@redhat.com> - 0.3.0-8.devel
cchance 1ea3e19
- Fixed bz#237916: [chewing] Candidate list (symbol) page change inaccracy.
cchance 1ea3e19
cchance 00f32fc
* Fri Apr 20 2007 Caius Chance <cchance@redhat.com> - 0.3.0-7.fc7
cchance 00f32fc
- Fixed bz#237233: Up arrow on candidate list doesn't work.
cchance 00f32fc
cchance e58ffa7
* Fri Mar 09 2007 Caius Chance <cchance@redhat.com> - 0.3.0-6.devel
dfcb414
- Fixed bz231568: [chewing] Look up table is showing candidates of previous
cchance e58ffa7
  look-up.
cchance e58ffa7
cchance 7d43204
* Tue Nov 21 2006 Caius Chance <cchance@redhat.com> - 0.3.0-5.fc7
cchance 7d43204
- Fixed bz#216581: Ported the following bugfix:
cchance 7d43204
- (bz#216337: Page Up / Page Down key doesn't when Chewing is activated.)
cchance 7d43204
- (bz#209575: preedit buffer is not cleared when framework calls for
cchance 7d43204
  instance reset.)
cchance 7d43204
cchance 0e5f655
* Fri Sep 15 2006 Caius Chance <cchance@redhat.com> - 0.3.0-4.fc6
dfcb414
- Fixed bz#206232 - Shift_L + space doesn't work correctly
cchance 0e5f655
cchance 37c87a5
* Mon Sep 04 2006 Caius Chance <cchance@redhat.com> - 0.3.0-3.fc6
cchance 37c87a5
- Fixed bz#199353 - scim-chewing hangs for commit > 6 characters
cchance 37c87a5
29e01cd
* Wed Jul 19 2006 Jesse Keating <jkeating@redhat.com> - 0.3.0-2
29e01cd
- fix release
29e01cd
b636a37
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.3.0-1.2.1.1
b636a37
- rebuild
b636a37
dsantani 865e6f3
* Mon May 22 2006 Darshan Santani <dsantani@redhat.com>
dsantani 865e6f3
- New source tarball added.
dsantani 865e6f3
- Rebuild.
dsantani 865e6f3
e2c71e2
* Thu May 18 2006 Jens Petersen <petersen@redhat.com>
e2c71e2
- configure with --disable-static
e2c71e2
- exclude INSTALL from docs
e2c71e2
ef5afae
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.2.7-1.2.1
ef5afae
- bump again for double-long bug on ppc(64)
ef5afae
df3e42f
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.2.7-1.2
df3e42f
- rebuilt for new gcc4.1 snapshot and glibc changes
df3e42f
22d7fe8
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
22d7fe8
- rebuilt
22d7fe8
3bcc798
* Tue Aug 16 2005 Jens Petersen <petersen@redhat.com> - 0.2.7-1
3bcc798
- Initial build for Fedora Core
3bcc798
- cleanup spec file according to Fedora standard
3bcc798
3bcc798
* Fri Dec 31 2004 rabit <rabit@ipserv.org> 0.2.5-fc3
3bcc798
- update for 0.2.5. and fedora core 3
3bcc798
3bcc798
* Thu Oct 8 2004 rabit <rabit@ipserv.org> 0.2.4-fc2
3bcc798
- update for 0.2.4.
3bcc798
3bcc798
* Thu Oct 7 2004 rabit <rabit@ipserv.org> 0.2.3-fc2
3bcc798
- Initial build.