PageRenderTime 65ms CodeModel.GetById 1ms app.highlight 61ms RepoModel.GetById 1ms app.codeStats 0ms

/scim-python.spec.in

http://scim-python.googlecode.com/
Autoconf | 231 lines | 182 code | 48 blank | 1 comment | 10 complexity | ebdaad6f6079e11a42d1d4fe41061076 MD5 | raw file
  1%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  3%define mod_path scim-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@
  4Name:       scim-python
  5Version:    @PACKAGE_VERSION@
  6Release:    1%{?dist}
  7Summary:    Python wrapper for Smart Common Input Method platform
  8
  9License:    LGPLv2+
 10Group:      System Environment/Libraries
 11URL:        http://code.google.com/p/scim-python/
 12Source0:    http://scim-python.googlecode.com/files/%{name}-%{version}.tar.gz
 13Source1:    http://scim-python.googlecode.com/files/pinyin-database-0.1.10.5.tar.bz2
 14Source2:    http://scim-python.googlecode.com/files/xingma-zhengma-0.1.10.tar.bz2
 15Source3:    http://scim-python.googlecode.com/files/xingma-wubi86-0.1.10.tar.bz2
 16Source4:    http://scim-python.googlecode.com/files/xingma-erbi-qingsong-0.1.10.tar.bz2
 17Source5:    http://scim-python.googlecode.com/files/xingma-cangjie5-0.1.10.tar.bz2
 18
 19BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 20BuildRequires:  scim-devel, gettext-devel, libtool, python-devel, pygtk2-devel, perl(XML::Parser)
 21Requires:   scim, pygtk2
 22
 23%description
 24Python wrapper for Smart Common Input Method platform.
 25
 26%package english
 27Summary:    Python english IM engine 
 28Group:      System Environment/Libraries
 29BuildRequires:  python-enchant
 30Requires:   %{name} = %{version}-%{release} python-enchant
 31
 32%description english
 33This package contains a python english IM engine.
 34
 35%package pinyin
 36Summary:    Two python chinese pinyin IM engines 
 37Group:      System Environment/Libraries
 38Requires:   %{name} = %{version}-%{release}
 39
 40%description pinyin
 41This package contains two python chinese pinyin IM engines.
 42
 43
 44%package chinese
 45Summary:    Python chinese IM engines 
 46Group:      System Environment/Libraries
 47Requires:   %{name} = %{version}-%{release}
 48Requires:   %{name}-pinyin = %{version}-%{release}
 49Requires:   %{name}-xingma-cangjie = %{version}-%{release}
 50Requires:   %{name}-xingma-erbi = %{version}-%{release}
 51Requires:   %{name}-xingma-wubi = %{version}-%{release}
 52Requires:   %{name}-xingma-zhengma = %{version}-%{release}
 53
 54%description chinese
 55This package contains some python chinese IM engines.
 56
 57%package xingma
 58Summary:    Python XingMa IM engine 
 59Group:      System Environment/Libraries
 60Requires:   %{name} = %{version}-%{release}
 61
 62%description xingma
 63This package contains a python XingMa IM engine.
 64
 65%package xingma-cangjie
 66Summary:    CangJie table for Python XingMa IM engine 
 67Group:      System Environment/Libraries
 68Requires:   %{name}-xingma = %{version}-%{release}
 69
 70%description xingma-cangjie
 71This package contains a CangJie table for python XingMa IM engine.
 72
 73%package xingma-erbi
 74Summary:    ErBi table for Python XingMa IM engine 
 75Group:      System Environment/Libraries
 76Requires:   %{name}-xingma = %{version}-%{release}
 77
 78%description xingma-erbi
 79This package contains an ErBi table for python XingMa IM engine.
 80
 81%package xingma-wubi
 82Summary:    WuBi table for Python XingMa IM engine 
 83Group:      System Environment/Libraries
 84Requires:   %{name}-xingma = %{version}-%{release}
 85
 86%description xingma-wubi
 87This package contains an ZhengMa table for python XingMa IM engine.
 88
 89%package xingma-zhengma
 90Summary:    ZhengMa table for Python XingMa IM engine 
 91Group:      System Environment/Libraries
 92Requires:   %{name}-xingma = %{version}-%{release}
 93
 94%description xingma-zhengma
 95This package contains an ZhengMa table for python XingMa IM engine.
 96
 97%prep
 98%setup -q -a2 -a3 -a4 -a5
 99cp %{SOURCE1} python/engine/PinYin/
100
101%build
102%configure --disable-static --enable-english-writer --enable-pinyin
103# make -C po update-gmo
104make NO_INDEX=true %{?_smp_mflags}
105python python/engine/XingMa/XMCreateDB.py -o -s cangjie5.txt.bz2 -p data/pinyin_table.txt
106python python/engine/XingMa/XMCreateDB.py -o -s erbi-qs.txt.bz2 -p data/pinyin_table.txt
107python python/engine/XingMa/XMCreateDB.py -o -s wubi.txt.bz2 -p data/pinyin_table.txt
108python python/engine/XingMa/XMCreateDB.py -o -s zhengma.txt.bz2 -p data/pinyin_table.txt
109
110%install
111rm -rf $RPM_BUILD_ROOT
112make NO_INDEX=true DESTDIR=${RPM_BUILD_ROOT} install
113rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{mod_path}/scim/_scim.la
114rm -f $RPM_BUILD_ROOT%{_libdir}/scim-1.0/1.4.0/SetupUI/zhengjuui.la
115install -m 644 cangjie5.db $RPM_BUILD_ROOT%{_datadir}/scim-python/engine/XingMa/tables/
116install -m 644 cangjie.png $RPM_BUILD_ROOT%{_datadir}/scim/icons/
117install -m 644 erbi-qs.db $RPM_BUILD_ROOT%{_datadir}/scim-python/engine/XingMa/tables/
118install -m 644 erbi-qs.png $RPM_BUILD_ROOT%{_datadir}/scim/icons/
119install -m 644 wubi.db $RPM_BUILD_ROOT%{_datadir}/scim-python/engine/XingMa/tables/
120install -m 644 wubi.png $RPM_BUILD_ROOT%{_datadir}/scim/icons/
121install -m 644 zhengma.db $RPM_BUILD_ROOT%{_datadir}/scim-python/engine/XingMa/tables/
122install -m 644 zhengma.png $RPM_BUILD_ROOT%{_datadir}/scim/icons/
123
124%find_lang %{name}
125
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%post pinyin
131cd /usr/share/scim-python/engine/PinYin
132echo "Creating INDEX."
133python -c "import PYSQLiteDB; db = PYSQLiteDB.PYSQLiteDB (); db.create_indexes ();"
134
135%post xingma-cangjie
136XMCreateDB -i -n %{_datadir}/scim-python/engine/XingMa/tables/cangjie5.db
137
138%post xingma-erbi
139XMCreateDB -i -n %{_datadir}/scim-python/engine/XingMa/tables/erbi-qs.db
140
141%post xingma-wubi
142XMCreateDB -i -n %{_datadir}/scim-python/engine/XingMa/tables/wubi.db
143
144%post xingma-zhengma
145XMCreateDB -i -n %{_datadir}/scim-python/engine/XingMa/tables/zhengma.db
146
147
148%files -f %{name}.lang
149%defattr(-,root,root,-)
150%doc AUTHORS COPYING README TODO
151%{python_sitearch}/%{mod_path}/
152%{python_sitearch}/scim.pth
153%{_libdir}/scim-1.0/1.4.0/IMEngine/python.so
154%{_libdir}/scim-1.0/1.4.0/Helper/python.so
155%{_libdir}/scim-1.0/1.4.0/SetupUI/python.so
156%dir %{_datadir}/scim-python/
157%dir %{_datadir}/scim-python/engine
158%{_datadir}/scim-python/engine/__init__.*
159%dir %{_datadir}/scim-python/setupui
160%{_datadir}/scim-python/setupui/__init__.*
161%dir %{_datadir}/scim-python/helper
162%{_datadir}/scim-python/helper/__init__.*
163%{_datadir}/scim/icons/scim-python.png
164
165%files english
166%defattr(-,root,root,-)
167%{_datadir}/scim-python/engine/EnglishWriter
168%{_datadir}/scim-python/setupui/EnglishWriter
169
170%files chinese
171%defattr(-,root,root,-)
172
173%files pinyin
174%defattr(-,root,root,-)
175%{_datadir}/scim-python/data/pinyin_table.txt
176%{_datadir}/scim-python/engine/PinYin
177%{_datadir}/scim-python/helper/PinYinSetup
178%{_datadir}/scim-python/helper/ZhengJuSetup
179
180%files xingma
181%defattr(-,root,root,-)
182%{_bindir}/XMCreateDB
183%{_datadir}/scim-python/engine/XingMa/*.py
184%{_datadir}/scim-python/engine/XingMa/*.pyc
185%{_datadir}/scim-python/engine/XingMa/*.pyo
186%{_datadir}/scim-python/engine/XingMa/tables/.keep
187%{_datadir}/scim/icons/py-mode.png
188%{_datadir}/scim/icons/xm-mode.png
189
190%files xingma-cangjie
191%defattr(-,root,root,-)
192%{_datadir}/scim-python/engine/XingMa/tables/cangjie5.db
193%{_datadir}/scim/icons/cangjie.png
194
195%files xingma-erbi
196%defattr(-,root,root,-)
197%{_datadir}/scim-python/engine/XingMa/tables/erbi-qs.db
198%{_datadir}/scim/icons/erbi-qs.png
199
200%files xingma-wubi
201%defattr(-,root,root,-)
202%{_datadir}/scim-python/engine/XingMa/tables/wubi.db
203%{_datadir}/scim/icons/wubi.png
204
205%files xingma-zhengma
206%defattr(-,root,root,-)
207%{_datadir}/scim-python/engine/XingMa/tables/zhengma.db
208%{_datadir}/scim/icons/zhengma.png
209
210
211%changelog
212* Wed Sep 26 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.1.3-1
213- Update to 0.1.3.
214
215* Wed Sep 26 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.1.2-3
216- Fix build warning.
217- Fix rpmlint checking warning.
218- Fix build failed in x86_64 platform.
219
220* Wed Sep 26 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.1.2-2
221- Change files: add %%dir %%{_datadir}/scim-python
222- Fix build failed in x86_64 platform.
223
224* Wed Sep 26 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.1.2-1
225- Update to 0.1.2
226
227* Mon Sep 24 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.0.2-1
228- Update to 0.0.2
229
230* Mon Sep 17 2007 Huang Peng <shawn.p.huang@gmail.com> - 0.0.1-1
231- Init version