mozc-vl.spec 12 KB

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