mozc-vl.spec 14 KB

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