mozc-vl.spec 13 KB

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