%define ver 1.12.1599.102 %define rel 4 # if you want to make scim-mozc package, rpm --define with_scim:1 %define with_scim 0 %if %{with_scim} %define scim_dir %(pkg-config --variable=moduledir scim) %endif %define mozc_el mozc-el Name: mozc Summary: Japanese Input Method Editor designed for multi-platform Summary(ja): マルチプラットホームで動くように設計された日本語インプットメソッドエディタ Version: %{ver} Release: %{rel}%{?_dist_release} Group: System Environment/Libraries License: BSD-like URL: http://code.google.com/p/mozc/ Source0: http://mozc.googlecode.com/files/%{name}-%{version}.tar.bz2 ## svn debian/copyright Source1: mozc-copyright # for mozc-el Source2: %{name}-install.sh Source3: %{name}-remove.sh Source4: vine-default-%{name}.el Source5: %{name}-init.el #Source6: protobuf-2.5.0-r497.tar.bz2 # Vine Lunux Source10: README.vine Patch10: mozc-1.10.1390.102-ibus-japanese.patch # fcitx-mozc Patch15: fcitx-mozc-1.12.1599.102.1.patch Source15: fcitx-mozc-icon.tar.gz # japanpost Source20: http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip Source21: http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: python, ibus-devel, dbus-devel BuildRequires: openssl-devel, zlib-devel BuildRequires: curl-devel BuildRequires: gtest-devel BuildRequires: qt4-devel BuildRequires: gyp BuildRequires: pkgconfig BuildRequires: gtk2-devel BuildRequires: protobuf-devel %if %{with_scim} # for scim-mozc BuildRequires: scim-devel %endif # for 1.1.690.102+ BuildRequires: zinnia-devel # fcitx BuildRequires: fcitx-devel Requires: mozc-server = %{version}-%{release} Requires: mozc-utils-gui = %{version}-%{release} Distribution: Vine Linux Vendor: Project Vine Packager: kazutaka, daisuke %description Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux. This open-source project originates from Google Japanese Input. %description -l ja Mozc は日本語入力用の IME (Imput Method Editor)です。 Chromium OS や Windows、Mac、Linux といったマルチプラット フォームで利用できるようにデザインされており、「Google日本語 入力」のオープンソース版です。 %package server Summary: Server part of the Mozc input method Summary(ja): Mozc インプットメソッドのサーバ部分 Group: Applications/System %description server Server part of the Mozc input method, used by Mozc clients such as ibus-mozc. %description server -l ja Mozc インプットメソッドのサーバ部分。ibus-mozcなどのMozcクライアントから 使うことができます。 %package -n ibus-mozc Summary: iBus engine module for Mozc Summary(ja): Mozc 用 iBus エンジンモジュール Group: System Environment/Libraries Requires: mozc = %{version}-%{release} %description -n ibus-mozc iBus engine module for Mozc. %description -n ibus-mozc -l ja Mozc 用 iBus エンジンモジュール。 %if %{with_scim} %package -n scim-mozc Summary: SCIM IMEngine module for Mozc Summary(ja): Mozc 用 SCIM IM エンジンモジュール Group: System Environment/Libraries Requires: mozc = %{version}-%{release} Requires: scim gtk2 %description -n scim-mozc SCIM IMEngine module for Mozc. %description -n scim-mozc -l ja Mozc 用 SCIM IMエンジンモジュール %endif %package -n fcitx-mozc Summary: Fcitx IMEngine module for Mozc Summary(ja): Mozc 用 Fcitx IM エンジンモジュール Group: System Environment/Libraries Requires: mozc = %{version}-%{release} Requires: fcitx %description -n fcitx-mozc Fcitx IMEngine module for Mozc. %description -n fcitx-mozc -l ja Mozc 用 Fcitx IM エンジンモジュール %package utils-gui Summary: Mozc GUI utilities Summary(ja): Mozc GUI ユーティリティー Group: Applications/System Requires: qt4 Requires: mozc-server = %{version}-%{release} Requires: tegaki-zinnia-japanese %description utils-gui Mozc GUI uitilities, such as the configuration dialog, user dictionary tool and about dialog. %description utils-gui -l ja Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツールなどが含まれます。 %package -n %{mozc_el} Summary: Emacs Lisp frontend for Mozc Summary(ja): Mozc 用 Emacs Lisp フロントエンド Group: Applications/Editors/Emacs BuildRequires: emacs Requires(post,preun): emacsen, emacsen-common >= 0.1 Requires: mozc-server = %{version}-%{release} %description -n %{mozc_el} Emacs Lisp frontend for Mozc %description -n %{mozc_el} -l ja Mozc のための Emacs-lisp フロントエンド %prep %setup -q -a 20 -a 21 -a 15 %patch10 -p1 -b .japanese %{__cp} -p %{SOURCE1} COPYING (cd data/dictionary_oss; python ../../dictionary/gen_zip_code_seed.py --zip_code=../../KEN_ALL.CSV --jigyosyo=../../JIGYOSYO.CSV >> dictionary09.txt; ) # fcitx %patch15 -p2 # update execute files path %{__sed} -i -e "s|/usr/lib/mozc|%{_libexecdir}|g" base/const.h %build unset QTDIR GYP_DEFINES="use_libprotobuf=1 zinnia_model_file=/usr/share/zinnia/model/tomoe/handwriting-ja.model ibus_mozc_path=%{_libexecdir}/ibus-engine-mozc ibus_mozc_icon_path=%{_datadir}/ibus-mozc/product_icon.png" \ %{__python} build_mozc.py gyp \ --gypdir=%{_bindir} \ --server_dir=%{_libexecdir} %{__python} build_mozc.py build_tools -c Release %{__python} build_mozc.py build -c Release \ unix/ibus/ibus.gyp:ibus_mozc \ %if %{with_scim} unix/scim/scim.gyp:scim_mozc \ unix/scim/scim.gyp:scim_mozc_setup \ %endif unix/fcitx/fcitx.gyp:fcitx-mozc \ unix/emacs/emacs.gyp:mozc_emacs_helper \ server/server.gyp:mozc_server \ gui/gui.gyp:mozc_tool \ renderer/renderer.gyp:mozc_renderer %install %{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot}%{_libdir} %{__mkdir_p} %{buildroot}%{_libexecdir} %define output_dir out_linux/Release # main # ibus-mozc %{__cp} -p %{output_dir}/ibus_mozc %{buildroot}%{_libexecdir}/ibus-engine-mozc %{__mkdir_p} %{buildroot}%{_datadir}/ibus/component/ %{__cp} -p %{output_dir}/obj/gen/unix/ibus/mozc.xml %{buildroot}%{_datadir}/ibus/component/ ## install icons %{__mkdir_p} %{buildroot}%{_datadir}/ibus-mozc/setup (cd data/images/unix; install -p -m0644 ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/ibus-mozc/product_icon.png for i in ui-*.png; do install -p -m0644 $i %{buildroot}%{_datadir}/ibus-mozc/${i//ui-/} done) # mozc_renderer %{__cp} -p %{output_dir}/mozc_renderer %{buildroot}%{_libexecdir} %if %{with_scim} # scim-mozc %{__mkdir_p} %{buildroot}%{scim_dir}/{IMEngine,SetupUI} %{__cp} -p %{output_dir}/lib.target/libscim_mozc.so \ %{buildroot}%{scim_dir}/IMEngine/mozc.so %{__cp} -p %{output_dir}/lib.target/libscim_mozc_setup.so \ %{buildroot}%{scim_dir}/SetupUI/mozc-setup.so ## install icons %{__mkdir_p} %{buildroot}%{_datadir}/scim/icons (cd data/images/unix; install -p -m0644 ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/scim/icons/product_icon.png for i in ui-*.png; do install -p -m0644 $i %{buildroot}%{_datadir}/scim/icons/${i//ui-/} done) %endif # fcitx-mozc %{__mkdir_p} %{buildroot}%{_libdir}/fcitx %{__cp} -p %{output_dir}/fcitx-mozc.so %{buildroot}%{_libdir}/fcitx %{__mkdir_p} %{buildroot}%{_datadir}/fcitx/addon/ %{__cp} -p unix/fcitx/fcitx-mozc.conf %{buildroot}%{_datadir}/fcitx/addon/ %{__mkdir_p} %{buildroot}%{_datadir}/fcitx/inputmethod/ %{__cp} -p unix/fcitx/mozc.conf %{buildroot}%{_datadir}/fcitx/inputmethod/ (cd %{output_dir}/obj/gen/unix/fcitx/po; for i in *.mo; do %{__mkdir_p} %{buildroot}%{_localedir}/${i/.mo/}/ ; %{__cp} -p $i %{buildroot}%{_localedir}/${i/.mo/}/fcitx-mozc.mo done) %{__mkdir_p} %{buildroot}%{_datadir}/fcitx/mozc/icon/ %{__cp} -p fcitx-mozc-icons/*.png %{buildroot}%{_datadir}/fcitx/mozc/icon/ # mozc-server %{__cp} -p %{output_dir}/mozc_server %{buildroot}%{_libexecdir} # mozc_tool %{__cp} -p %{output_dir}/mozc_tool %{buildroot}%{_libexecdir} # mozc-el %{__cp} -p %{output_dir}/mozc_emacs_helper %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{name}/packages mkdir -p %{buildroot}%{emacsen_pkgdir}/install mkdir -p %{buildroot}%{emacsen_pkgdir}/remove cp -p unix/emacs/mozc.el %{SOURCE4} %{SOURCE5} %{buildroot}%{_datadir}/emacs/site-lisp/%{name} # # install script (bytecompile el and install elc , remove) # %_installemacsenscript %{name} %{SOURCE2} %_removeemacsenscript %{name} %{SOURCE3} # install document %{__cp} %{SOURCE10} . %clean rm -rf $RPM_BUILD_ROOT %post -n %{mozc_el} # # bytecompile and install # if [ "$1" = 2 ]; then %_emacsenPackageRemove %{name} fi %_addemacsenlist %{name} %_emacsenPackageInstall %{name} %preun -n %{mozc_el} if [ "$1" = 0 ]; then %_emacsenPackageRemove %{name} %_removeemacsenlist %{name} fi %files %defattr(-,root,root) %doc COPYING README.vine CONTRIBUTORS %files server %defattr(-,root,root) %doc COPYING README.vine %{_libexecdir}/mozc_server %files utils-gui %defattr(-,root,root) %doc COPYING %{_libexecdir}/mozc_tool %files -n ibus-mozc %defattr(-,root,root) %doc COPYING %{_libexecdir}/ibus-engine-mozc %{_libexecdir}/mozc_renderer %{_datadir}/ibus/component/mozc.xml %dir %{_datadir}/ibus-mozc %dir %{_datadir}/ibus-mozc/setup %{_datadir}/ibus-mozc/*.png %if %{with_scim} %files -n scim-mozc %defattr(-,root,root) %doc COPYING %{scim_dir}/SetupUI/mozc-setup.so %{scim_dir}/IMEngine/mozc.so %{_datadir}/scim/icons/*.png %endif %files -n fcitx-mozc %defattr(-,root,root) %doc COPYING %{_libdir}/fcitx/*.so %{_datadir}/fcitx/addon/fcitx-mozc.conf %{_datadir}/fcitx/inputmethod/mozc.conf %{_localedir}/*/fcitx-mozc.mo %dir %{_datadir}/fcitx/mozc/icon/ %{_datadir}/fcitx/mozc/icon/*.png %files -n %{mozc_el} %defattr(-,root,root) %doc COPYING %{_libexecdir}/mozc_emacs_helper %{_datadir}/emacs/site-lisp/%{name} %{emacsen_pkgdir}/install/%{name} %{emacsen_pkgdir}/remove/%{name} %changelog * Sun Dec 29 2013 IWAI, Masaharu 1.12.1599.102-4 - update vine-default-mozc.el (Source4) - always 'setq mozc-helper-program-name' * Tue Dec 24 2013 IWAI, Masaharu 1.12.1599.102-3 - apply vine-default: fix Source5 * Sat Nov 16 2013 Daisuke SUZUKI 1.12.1599.102-2 - fix ibus-engine-mozc path * Wed Nov 13 2013 Daisuke SUZUKI 1.12.1599.102-1 - update to 1.12.1599.102 - add fcitx-mozc patch - create fcitx-mozc subpackage * Sun Apr 07 2013 Daisuke SUZUKI 1.10.1390.102-1 - new upstream release - use internal protobuf (add Source10) * Fri Oct 12 2012 Daisuke SUZUKI 1.6.1187.102-1 - new upstream release * Sun Sep 30 2012 Yoji TOYODA 1.5.1090.102-2 - rebuild with ibus-1.4.99.20120822 * Tue Jun 26 2012 Daisuke SUZUKI 1.5.1090.102-1 - new upstream release - enable mozc_renderer - move ibus-engine-mozc to %%_libexecdir * Wed May 09 2012 Daisuke SUZUKI 1.5.1053.102-1 - new upstream release - add --use_libprotobuf to link with system protobuf - add zipcode dictionaries (ken_all.zip, jigyosyo.zip) * Sun Feb 19 2012 Yoji TOYODA 1.3.975.102-2 - rebuild with protobuf-2.4.1 * Mon Feb 13 2012 Daisuke SUZUKI 1.3.975.102-1 - new upstream release * Sat Dec 24 2011 Daisuke SUZUKI 1.3.931.102-1 - new upstream release * Fri Dec 02 2011 Daisuke SUZUKI 1.3.911.102-1 - new upstream release - drop patch0 - add patch10 to translate panel menu * Wed Nov 30 2011 Daisuke SUZUKI 1.2.855.102-1 - new upstram release * Tue Aug 23 2011 Daisuke SUZUKI 1.1.773.102-1 - new upstram release * Fri Jul 22 2011 IWAI, Masaharu 1.1.717.102-2 - fix typo in ibus lang panel patch (Patch0): - stop built scim-mozc package by default * Fri May 20 2011 IWAI, Masaharu 1.1.717.102-1 - new upstream release * Tue Apr 19 2011 IWAI, Masaharu 1.1.690.102-2 - add Requires: tegaki-zinnia-japanese for utils-gui - build with "--channel_dev=0" option - fix License: droped mozcdic-ut dictionary in 0.12.402.102-1 * Fri Apr 15 2011 IWAI, Masaharu 1.1.690.102-1 - new upstream release - add BuildRequires: zinnia-devel * Fri Mar 25 2011 IWAI, Masaharu 1.1.626.102-1 - new upstream release * Sun Jan 30 2011 IWAI, Masaharu 1.0.558.102-2vl6 - build with openssl 1.0.0c * Sat Dec 18 2010 IWAI, Masaharu 1.0.558.102-1 - new upstream release - add CONTRIBUTORS in main package %%doc * Sat Nov 6 2010 IWAI, Masaharu 0.13.523.102-1 - new upstream release - drop unnecessary fixed compile error for Vine5 patch (Patch1) * Mon Oct 11 2010 IWAI, Masaharu 0.13.499.102-1 - new upstream release - new elisp sub-package: mozc-el: upstream released * Fri Sep 10 2010 IWAI, Masaharu 0.13.464.102-1 - new upstream release * Sun Aug 15 2010 IWAI, Masaharu 0.12.434.102-1 - new upstream release - replace icons: using official icons - drop AWASHIRO Ikuya's icons (Source3,4,5,6) * Mon Jul 12 2010 IWAI, Masaharu 0.12.402.102-2 - drop obsolete x86_64 libdir patch (Patch2) - replace source tarball: using upstream tarball - add mozc-copyright (Source1) from SVN debian/copyright * Fri Jul 2 2010 IWAI, Masaharu 0.12.402.102-1 - new upstream release - drop mozcdic-ut dictionary - update README.vine (Source10) - defined output_dir macro for %%install section * Thu Jun 24 2010 IWAI, Masaharu 0.11.383.102-3 - add x86_64 libdir patch (Patch2): based openSUSE by kazukado * Mon Jun 21 2010 IWAI, Masaharu 0.11.383.102-2 - create new package scim-mozc - add icons (Source5, Source6) - update icons (Source3, Source4) * Fri Jun 18 2010 IWAI, Masaharu 0.11.383.102-1 - update to 0.11.383.102 (svn rev.30) * Wed Jun 9 2010 IWAI, Masaharu 0.11.0-9.svn28 - update execute files path: * Fri Jun 4 2010 IWAI, Masaharu 0.11.0-8.svn28 - disable all mozcdic-ut dictionary (disable jinmei and zipcode) - update README.vine - add BuildRequires: gyp - drop BuildRequires: subversion * Wed Jun 2 2010 IWAI, Masaharu 0.11.0-7.svn28 - add mozc_tool's icon (Source4) - rename Source0: fixed created directory name "src" * Tue Jun 1 2010 IWAI, Masaharu 0.11.0-6.svn28 - update mozcdic-ut 20100601 (Source10) - include documents for all dictionaries - add BuildRequires: qt4-devel * Tue Jun 1 2010 IWAI, Masaharu 0.11.0-5.svn28 - rename base name: mozc - add new sub packages: - mozc-server - mozc-utils-gui - update source to revision 28 - replace icon (Source3) - drop mozc-config: upstream implement same tool * Sun May 23 2010 Kazutaka HARADA 0.11.0-4 - update source to revision 23 - add BuildRequires protobuf-devel, gtest-devel - drop Patch0 (ibus-mozc-fix-for-x86_64.diff) - add mozc-config as Source10 and desktop entry as Source11 * Sat May 15 2010 IWAI, Masaharu 0.11.0-3 - rebuild with ibus-1.3.3 * Fri May 14 2010 Kazutaka HARADA 0.11.0-2 - add Patch1 to fix compile error on i386 (workaround patch) * Thu May 13 2010 Kazutaka HARADA 0.11.0-1 - initial build for Vine Liux based on custom mandriva package made by UTUMI-san * Thu May 13 2010 UTUMI Hirosi 0.11.0-2.20110511.1mdv2010.1 - add some dictionaries * Wed May 12 2010 UTUMI Hirosi 0.11.0-1.20110511.1mdv2010.1 - first release