mozc-vl.spec 15 KB

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