mozc-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. %define ver 1.1.717.102
  2. %define rel 2
  3. # if you want to make scim-mozc package, rpm --define with_scim:1
  4. %define with_scim 0
  5. %if %{with_scim}
  6. %define scim_dir %(pkg-config --variable=moduledir scim)
  7. %endif
  8. %define mozc_el mozc-el
  9. Name: mozc
  10. Summary: Japanese Input Method Editor designed for multi-platform
  11. Summary(ja): マルチプラットホームで動くように設計された日本語インプットメソッドエディタ
  12. Version: %{ver}
  13. Release: %{rel}%{?_dist_release}
  14. Group: System Environment/Libraries
  15. License: BSD-like
  16. URL: http://code.google.com/p/mozc/
  17. Source0: http://mozc.googlecode.com/files/%{name}-%{version}.tar.bz2
  18. ## svn debian/copyright
  19. Source1: mozc-copyright
  20. # for mozc-el
  21. Source2: %{name}-install.sh
  22. Source3: %{name}-remove.sh
  23. Source4: vine-default-%{name}.el
  24. Source5: %{name}-init.el
  25. # Vine Lunux
  26. Source10: README.vine
  27. Patch0: mozc-1.1.717.102-ibus-lang_panel.patch
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  29. BuildRequires: python, ibus-devel, dbus-devel
  30. BuildRequires: openssl-devel, zlib-devel
  31. BuildRequires: curl-devel
  32. BuildRequires: protobuf-devel, gtest-devel
  33. BuildRequires: qt4-devel
  34. BuildRequires: gyp
  35. %if %{with_scim}
  36. # for scim-mozc
  37. BuildRequires: pkgconfig
  38. BuildRequires: gtk2-devel
  39. BuildRequires: scim-devel
  40. %endif
  41. # for 1.1.690.102+
  42. BuildRequires: zinnia-devel
  43. Requires: mozc-server = %{version}-%{release}
  44. Requires: mozc-utils-gui = %{version}-%{release}
  45. Requires: ibus-mozc = %{version}-%{release}
  46. Packager: kazutaka
  47. %description
  48. Mozc is a Japanese Input Method Editor (IME) designed for
  49. multi-platform such as Chromium OS, Windows, Mac and Linux.
  50. This open-source project originates from Google Japanese Input.
  51. %description -l ja
  52. Mozc は日本語入力用の IME (Imput Method Editor)です。
  53. Chromium OS や Windows、Mac、Linux といったマルチプラット
  54. フォームで利用できるようにデザインされており、「Google日本語
  55. 入力」のオープンソース版です。
  56. %package server
  57. Summary: Server part of the Mozc input method
  58. Summary(ja): Mozc インプットメソッドのサーバ部分
  59. Group: Applications/System
  60. %description server
  61. Server part of the Mozc input method, used by Mozc clients such as
  62. ibus-mozc.
  63. %description server -l ja
  64. Mozc インプットメソッドのサーバ部分。ibus-mozcなどのMozcクライアントから
  65. 使うことができます。
  66. %package -n ibus-mozc
  67. Summary: iBus engine module for Mozc
  68. Summary(ja): Mozc 用 iBus エンジンモジュール
  69. Group: System Environment/Libraries
  70. Requires: mozc-server = %{version}-%{release}
  71. %description -n ibus-mozc
  72. iBus engine module for Mozc.
  73. %description -n ibus-mozc -l ja
  74. Mozc 用 iBus エンジンモジュール。
  75. %if %{with_scim}
  76. %package -n scim-mozc
  77. Summary: SCIM IMEngine module for Mozc
  78. Summary(ja): Mozc 用 SCIM IMEngine モジュール
  79. Group: System Environment/Libraries
  80. Requires: mozc-server = %{version}-%{release}
  81. Requires: scim gtk2
  82. %description -n scim-mozc
  83. SCIM IMEngine module for Mozc.
  84. %description -n scim-mozc -l ja
  85. Mozc 用 SCIM IMエンジンモジュール
  86. %endif
  87. %package utils-gui
  88. Summary: Mozc GUI utilities
  89. Summary(ja): Mozc GUI ユーティリティー
  90. Group: Applications/System
  91. Requires: qt4
  92. Requires: mozc-server = %{version}-%{release}
  93. Requires: tegaki-zinnia-japanese
  94. %description utils-gui
  95. Mozc GUI uitilities, such as the configuration dialog, user dictionary
  96. tool and about dialog.
  97. %description utils-gui -l ja
  98. Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツールなどが含まれます。
  99. %package -n %{mozc_el}
  100. Summary: Emacs Lisp frontend for Mozc
  101. Summary(ja): Mozc 用 Emacs Lisp フロントエンド
  102. Group: Applications/Editors/Emacs
  103. BuildRequires: emacs
  104. Requires(post,preun): emacsen, emacsen-common >= 0.1
  105. Requires: mozc-server = %{version}-%{release}
  106. %description -n %{mozc_el}
  107. Emacs Lisp frontend for Mozc
  108. %description -n %{mozc_el} -l ja
  109. Mozc のための Emacs-lisp フロントエンド
  110. %prep
  111. %setup -q
  112. %patch0 -p1 -b .ibus_lang_pannel
  113. %{__cp} -p %{SOURCE1} COPYING
  114. # update execute files path
  115. %{__sed} -i -e"s|/usr/lib/mozc|%{_libexecdir}|g" base/util.cc
  116. %build
  117. %{__python} build_mozc.py gyp --gypdir=%{_bindir} --channel_dev=0
  118. %{__python} build_mozc.py build_tools -c Release
  119. %{__python} build_mozc.py build -c Release unix/ibus/ibus.gyp:ibus_mozc \
  120. %if %{with_scim}
  121. unix/scim/scim.gyp:scim_mozc unix/scim/scim.gyp:scim_mozc_setup \
  122. %endif
  123. unix/emacs/emacs.gyp:mozc_emacs_helper server/server.gyp:mozc_server \
  124. gui/gui.gyp:mozc_tool
  125. %install
  126. %{__rm} -rf %{buildroot}
  127. %{__mkdir_p} %{buildroot}%{_libdir}
  128. %{__mkdir_p} %{buildroot}%{_libexecdir}
  129. %define output_dir out_linux/Release
  130. # main
  131. # ibus-mozc
  132. %{__cp} -p %{output_dir}/ibus_mozc %{buildroot}%{_libdir}/ibus-engine-mozc
  133. %{__mkdir_p} %{buildroot}%{_datadir}/ibus/component/
  134. %{__sed} 's|/usr/libexec|%{_libdir}|' < %{output_dir}/obj/gen/unix/ibus/mozc.xml > %{buildroot}%{_datadir}/ibus/component/mozc.xml
  135. ## install icons
  136. %{__mkdir_p} %{buildroot}%{_datadir}/ibus-mozc/setup
  137. %{__cp} -p data/images/unix/ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/ibus-mozc/product_icon.png
  138. %{__cp} -p data/images/unix/ui-tool.png %{buildroot}%{_datadir}/ibus-mozc/tool.png
  139. %{__cp} -p data/images/unix/ui-properties.png %{buildroot}%{_datadir}/ibus-mozc/properties.png
  140. %{__cp} -p data/images/unix/ui-dictionary.png %{buildroot}%{_datadir}/ibus-mozc/dictionary.png
  141. %{__cp} -p data/images/unix/ui-direct.png %{buildroot}%{_datadir}/ibus-mozc/direct.png
  142. %{__cp} -p data/images/unix/ui-hiragana.png %{buildroot}%{_datadir}/ibus-mozc/hiragana.png
  143. %{__cp} -p data/images/unix/ui-katakana_half.png %{buildroot}%{_datadir}/ibus-mozc/katakana_half.png
  144. %{__cp} -p data/images/unix/ui-katakana_full.png %{buildroot}%{_datadir}/ibus-mozc/katakana_full.png
  145. %{__cp} -p data/images/unix/ui-alpha_half.png %{buildroot}%{_datadir}/ibus-mozc/alpha_half.png
  146. %{__cp} -p data/images/unix/ui-alpha_full.png %{buildroot}%{_datadir}/ibus-mozc/alpha_full.png
  147. %if %{with_scim}
  148. # scim-mozc
  149. %{__mkdir_p} %{buildroot}%{scim_dir}/{IMEngine,SetupUI}
  150. %{__cp} -p %{output_dir}/lib.target/libscim_mozc.so \
  151. %{buildroot}%{scim_dir}/IMEngine/mozc.so
  152. %{__cp} -p %{output_dir}/lib.target/libscim_mozc_setup.so \
  153. %{buildroot}%{scim_dir}/SetupUI/mozc-setup.so
  154. ## install icons
  155. %{__mkdir_p} %{buildroot}%{_datadir}/scim/icons
  156. %{__cp} -p data/images/unix/ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/scim/icons/scim-mozc.png
  157. %{__cp} -p data/images/unix/ui-tool.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-tool.png
  158. %{__cp} -p data/images/unix/ui-properties.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-properties.png
  159. %{__cp} -p data/images/unix/ui-dictionary.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-dictionary.png
  160. %{__cp} -p data/images/unix/ui-direct.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-direct.png
  161. %{__cp} -p data/images/unix/ui-hiragana.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-hiragana.png
  162. %{__cp} -p data/images/unix/ui-katakana_half.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-katakana_half.png
  163. %{__cp} -p data/images/unix/ui-katakana_full.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-katakana_full.png
  164. %{__cp} -p data/images/unix/ui-alpha_half.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-alpha_half.png
  165. %{__cp} -p data/images/unix/ui-alpha_full.png %{buildroot}%{_datadir}/scim/icons/scim-mozc-alpha_full.png
  166. %endif
  167. # mozc-server
  168. %{__cp} -p %{output_dir}/mozc_server %{buildroot}%{_libexecdir}
  169. # mozc_tool
  170. %{__cp} -p %{output_dir}/mozc_tool %{buildroot}%{_libexecdir}
  171. # mozc-el
  172. %{__cp} -p %{output_dir}/mozc_emacs_helper %{buildroot}%{_libexecdir}
  173. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{name}/packages
  174. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  175. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  176. cp -p unix/emacs/mozc.el %{SOURCE4} %{SOURCE5} %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
  177. #
  178. # install script (bytecompile el and install elc , remove)
  179. #
  180. %_installemacsenscript %{name} %{SOURCE2}
  181. %_removeemacsenscript %{name} %{SOURCE3}
  182. # install document
  183. %{__cp} %{SOURCE10} .
  184. %clean
  185. rm -rf $RPM_BUILD_ROOT
  186. %post -n %{mozc_el}
  187. #
  188. # bytecompile and install
  189. #
  190. if [ "$1" = 2 ]; then
  191. %_emacsenPackageRemove %{name}
  192. fi
  193. %_addemacsenlist %{name}
  194. %_emacsenPackageInstall %{name}
  195. %preun -n %{mozc_el}
  196. if [ "$1" = 0 ]; then
  197. %_emacsenPackageRemove %{name}
  198. %_removeemacsenlist %{name}
  199. fi
  200. %files
  201. %defattr(-,root,root)
  202. %doc COPYING README.vine CONTRIBUTORS
  203. %files server
  204. %defattr(-,root,root)
  205. %doc COPYING README.vine
  206. %{_libexecdir}/mozc_server
  207. %files utils-gui
  208. %defattr(-,root,root)
  209. %doc COPYING
  210. %{_libexecdir}/mozc_tool
  211. %files -n ibus-mozc
  212. %defattr(-,root,root)
  213. %doc COPYING
  214. %{_libdir}/ibus-engine-mozc
  215. %{_datadir}/ibus/component/mozc.xml
  216. %dir %{_datadir}/ibus-mozc
  217. %dir %{_datadir}/ibus-mozc/setup
  218. %{_datadir}/ibus-mozc/*.png
  219. %if %{with_scim}
  220. %files -n scim-mozc
  221. %defattr(-,root,root)
  222. %doc COPYING
  223. %{scim_dir}/SetupUI/mozc-setup.so
  224. %{scim_dir}/IMEngine/mozc.so
  225. %{_datadir}/scim/icons/*.png
  226. %endif
  227. %files -n %{mozc_el}
  228. %defattr(-,root,root)
  229. %doc COPYING
  230. %{_libexecdir}/mozc_emacs_helper
  231. %{_datadir}/emacs/site-lisp/%{name}
  232. %{emacsen_pkgdir}/install/%{name}
  233. %{emacsen_pkgdir}/remove/%{name}
  234. %changelog
  235. * Fri Jul 22 2011 IWAI, Masaharu <iwai@alib.jp> 1.1.717.102-2
  236. - fix typo in ibus lang panel patch (Patch0): <BTS:VineLinux:1161>
  237. - stop built scim-mozc package by default
  238. * Fri May 20 2011 IWAI, Masaharu <iwai@alib.jp> 1.1.717.102-1
  239. - new upstream release
  240. * Tue Apr 19 2011 IWAI, Masaharu <iwai@alib.jp> 1.1.690.102-2
  241. - add Requires: tegaki-zinnia-japanese for utils-gui
  242. - build with "--channel_dev=0" option
  243. - fix License: droped mozcdic-ut dictionary in 0.12.402.102-1
  244. * Fri Apr 15 2011 IWAI, Masaharu <iwai@alib.jp> 1.1.690.102-1
  245. - new upstream release
  246. - add BuildRequires: zinnia-devel
  247. * Fri Mar 25 2011 IWAI, Masaharu <iwai@alib.jp> 1.1.626.102-1
  248. - new upstream release
  249. * Sun Jan 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.558.102-2vl6
  250. - build with openssl 1.0.0c
  251. * Sat Dec 18 2010 IWAI, Masaharu <iwai@alib.jp> 1.0.558.102-1
  252. - new upstream release
  253. - add CONTRIBUTORS in main package %%doc
  254. * Sat Nov 6 2010 IWAI, Masaharu <iwai@alib.jp> 0.13.523.102-1
  255. - new upstream release
  256. - drop unnecessary fixed compile error for Vine5 patch (Patch1)
  257. * Mon Oct 11 2010 IWAI, Masaharu <iwai@alib.jp> 0.13.499.102-1
  258. - new upstream release
  259. - new elisp sub-package: mozc-el: upstream released
  260. * Fri Sep 10 2010 IWAI, Masaharu <iwai@alib.jp> 0.13.464.102-1
  261. - new upstream release
  262. * Sun Aug 15 2010 IWAI, Masaharu <iwai@alib.jp> 0.12.434.102-1
  263. - new upstream release
  264. - replace icons: using official icons
  265. - drop AWASHIRO Ikuya's icons (Source3,4,5,6)
  266. * Mon Jul 12 2010 IWAI, Masaharu <iwai@alib.jp> 0.12.402.102-2
  267. - drop obsolete x86_64 libdir patch (Patch2)
  268. - replace source tarball: using upstream tarball
  269. - add mozc-copyright (Source1) from SVN debian/copyright
  270. * Fri Jul 2 2010 IWAI, Masaharu <iwai@alib.jp> 0.12.402.102-1
  271. - new upstream release
  272. - drop mozcdic-ut dictionary
  273. - update README.vine (Source10)
  274. - defined output_dir macro for %%install section
  275. * Thu Jun 24 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.383.102-3
  276. - add x86_64 libdir patch (Patch2): based openSUSE by kazukado
  277. * Mon Jun 21 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.383.102-2
  278. - create new package scim-mozc
  279. - add icons (Source5, Source6)
  280. - update icons (Source3, Source4)
  281. * Fri Jun 18 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.383.102-1
  282. - update to 0.11.383.102 (svn rev.30)
  283. * Wed Jun 9 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-9.svn28
  284. - update execute files path: <BTS:VineLinux:998>
  285. * Fri Jun 4 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-8.svn28
  286. - disable all mozcdic-ut dictionary (disable jinmei and zipcode)
  287. - update README.vine
  288. - add BuildRequires: gyp
  289. - drop BuildRequires: subversion
  290. * Wed Jun 2 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-7.svn28
  291. - add mozc_tool's icon (Source4)
  292. - rename Source0: fixed created directory name "src"
  293. * Tue Jun 1 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-6.svn28
  294. - update mozcdic-ut 20100601 (Source10)
  295. - include documents for all dictionaries
  296. - add BuildRequires: qt4-devel
  297. * Tue Jun 1 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-5.svn28
  298. - rename base name: mozc
  299. - add new sub packages:
  300. - mozc-server
  301. - mozc-utils-gui
  302. - update source to revision 28
  303. - replace icon (Source3)
  304. - drop mozc-config: upstream implement same tool
  305. * Sun May 23 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 0.11.0-4
  306. - update source to revision 23
  307. - add BuildRequires protobuf-devel, gtest-devel
  308. - drop Patch0 (ibus-mozc-fix-for-x86_64.diff)
  309. - add mozc-config as Source10 and desktop entry as Source11
  310. * Sat May 15 2010 IWAI, Masaharu <iwai@alib.jp> 0.11.0-3
  311. - rebuild with ibus-1.3.3
  312. * Fri May 14 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 0.11.0-2
  313. - add Patch1 to fix compile error on i386 (workaround patch)
  314. * Thu May 13 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 0.11.0-1
  315. - initial build for Vine Liux based on custom mandriva package made by UTUMI-san
  316. * Thu May 13 2010 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 0.11.0-2.20110511.1mdv2010.1
  317. - add some dictionaries
  318. * Wed May 12 2010 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 0.11.0-1.20110511.1mdv2010.1
  319. - first release