diff --git a/libchewing.spec b/libchewing.spec index 3067f87..94d4390 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -1,8 +1,12 @@ +%{!?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}/libchewing + %global im_name_zh_TW 新酷音輸入法 %global name_zh_TW %{im_name_zh_TW}函式庫 + Name: libchewing Version: 0.3.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Summary(zh_TW): %{name_zh_TW} @@ -11,34 +15,12 @@ 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 -#Patch3: libchewing-0.3.0-5.bz216581b.patch -#Patch4: libchewing-0.3.0-6.bz231568.patch -#Patch5: libchewing-0.3.0-7.bz237233.patch -#Patch6: libchewing-0.3.0-8.bz237916.patch -#Patch7: libchewing-0.3.0-9.bz200694.patch -#Patch8: libchewing-0.3.0-11.bz195416.patch -#Patch9: libchewing-0.3.2.bz477690.patch -#Patch10: libchewing-0.3.2.phraseChoiceRearward.2.patch -#Patch11: libchewing-0.3.2.chewing_zuin.patch -#Patch12: libchewing-0.3.2.hsu.patch -#Patch13: libchewing-0.3.2.hsu.2.patch -# Rhbz#625980 -#Patch14: libchewing-0.3.2.align.patch -# RHBZ$477690 -#Patch15: libchewing-0.3.3.multilibConflict.patch -Patch16: libchewing-0.3.4.asprintf.patch -Patch17: libchewing-0.3.4.tsiMissing.patch -Patch18: libchewing-0.3.4.texiDirEntry.patch +Patch1: libchewing-0.3.4.asprintf.patch +Patch2: libchewing-0.3.4.tsiMissing.patch +Patch3: libchewing-0.3.4.texiDirEntry.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 gawk texinfo +BuildRequires: autoconf automake libtool pkgconfig texinfo Requires(post): info Requires(preun): info @@ -46,7 +28,7 @@ Requires(preun): info libchewing is an intelligent phonetic input method library for Chinese. It provides the core algorithm and logic that can be used by various -input methods. The Chewing input method is a smart bopomofo phonetics +input methods. The Chewing input method is a smart bopomofo phonetics input method that is useful for inputting Mandarin Chinese. %description -l zh_TW @@ -59,7 +41,7 @@ input method that is useful for inputting Mandarin Chinese. Summary: Development files for libchewing Summary(zh_TW): %{name_zh_TW}開發者套件 Group: Development/Libraries -Requires: %{name} = %{version}-%{release}, pkgconfig +Requires: %{name}%{?_isa} = %{version}-%{release} %description -n %{name}-devel Headers and other files needed to develop applications using the %{name} @@ -75,7 +57,7 @@ Summary: Python binding for libchewing Summary(zh_TW): %{name_zh_TW} python 綁定 Group: Development/Libraries BuildRequires: python2-devel -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python %description -n %{name}-python @@ -86,41 +68,28 @@ 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 -%patch16 -p0 -b .asprintf -%patch17 -p0 -b .tsiMissing -%patch18 -p0 -b .texiDirEntry +%patch1 -p0 -b .asprintf +%patch2 -p0 -b .tsiMissing +%patch3 -p0 -b .texiDirEntry mkdir -p contrib/python -cp %SOURCE1 contrib/python +cp -p %SOURCE1 contrib/python %build export CFLAGS=-DLIBINSTDIR='\"%{_libdir}\" -g' autoreconf -ivf %configure --disable-static -%{__make} RPM_CFLAGS="%{optflags}" %{_smp_mflags} +make V=1 RPM_CFLAGS="%{optflags}" %{_smp_mflags} %install -%{__make} DESTDIR=%{buildroot} install -%{__rm} %{buildroot}%{_libdir}/libchewing.la -%{__mkdir} -p %{buildroot}%{libchewing_python_dir} -%{__cp} contrib/python/chewing.py %{buildroot}%{libchewing_python_dir} -%{__mkdir} -p %{buildroot}%{_libdir}/chewing +make DESTDIR=%{buildroot} install INSTALL="install -p" +rm %{buildroot}%{_libdir}/libchewing.la + +mkdir -p %{buildroot}%{libchewing_python_dir} +cp -p contrib/python/chewing.py %{buildroot}%{libchewing_python_dir} + +mkdir -p %{buildroot}%{_libdir}/chewing touch %{buildroot}%{libchewing_python_dir}/__init__.py + rm -f %{buildroot}/%{_infodir}/dir %post @@ -137,7 +106,6 @@ fi %clean %files -%defattr(-, root, root) %doc README AUTHORS COPYING %dir %{_libdir}/libchewing %{_libdir}/libchewing/* @@ -145,18 +113,19 @@ fi %{_infodir}/libchewing.info.gz %files devel -%defattr(-, root, root) %dir %{_includedir}/chewing %{_includedir}/chewing/* %{_libdir}/pkgconfig/chewing.pc %{_libdir}/*.so %files python -%defattr(-, root, root) %{libchewing_python_dir} %changelog -* Thu Feb 27 2013 Ding-Yi Chen - 0.3.4-3 +* Mon Jul 29 2013 Parag Nemade - 0.3.4-4 +- spec file cleanup to follow packaging guidelines + +* Wed Feb 27 2013 Ding-Yi Chen - 0.3.4-3 - Fixed [Bug 913214] libchewing complains "no info dir entry" while installing Add direntry in libchewing.texi so it can be listed under Category "Localization" @@ -202,7 +171,7 @@ fi - Resolves: #625980 Add padding to wch_t to ensure it's word aligned. -* Wed Mar 04 2010 Ding-Yi Chen - 0.3.2-27 +* Thu Mar 04 2010 Ding-Yi Chen - 0.3.2-27 - Fix Dvorak Hsu 4th tone key (ibus google issue 755 comment 12, chewing google issue 10) - Resolves: #555192 @@ -226,7 +195,7 @@ fi Thus update phraseChoiceRearward.patch as phraseChoiceRearward.2.patch - Resolves: #555192 -* Fri Jan 21 2010 Ding-Yi Chen - 0.3.2-20 +* Thu Jan 21 2010 Ding-Yi Chen - 0.3.2-20 - Resolves: #555192 - Fix for package wrangler. @@ -286,7 +255,7 @@ fi - touch python-/site-packages/libchewing/__init__.py, So python thinks libchewing is a library. -* Thu Jan 14 2009 Ding-Yi Chen - 0.3.2-3 +* Wed Jan 14 2009 Ding-Yi Chen - 0.3.2-3 - Add python binding by copy python/chewing.py to /site_packages/libchewing @@ -367,7 +336,7 @@ fi * Fri Dec 31 2004 rabit 0.2.5-fc3 - update for 0.2.5. and fedora core 3 -* Thu Oct 8 2004 rabit 0.2.4-fc2 +* Fri Oct 8 2004 rabit 0.2.4-fc2 - update for 0.2.4. * Thu Oct 7 2004 rabit 0.2.3-fc2