Blob Blame History Raw
%define		pkg	mozc

Name:		mozc
Version:	1.10.1390.102
Release:	1%{?dist}
Summary:	A Japanese Input Method Editor (IME) designed for multi-platform

Group:		System Environment/Libraries
License:	BSD and ASL 2.0 and UCD and Public Domain and mecab-ipadic
URL:		http://code.google.com/p/mozc
# data/unicode/: UCD
#  Copyright (c) 1991-2008 Unicode, Inc.
# data/test/stress_test/sentences.txt: Public Domain
# data/dictionary/: mecab-ipadic and BSD
#   See http://code.google.com/p/mozc/issues/detail?id=20
#   also data/installer/credits_en.html
Source0:	http://mozc.googlecode.com/files/mozc-%{version}.tar.bz2
Source1:	mozc-init.el
# Public Domain
Source2:	http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip
Source3:	http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip
Source4:	ibus-setup-mozc-jp.desktop
Patch0:		mozc-build-verbosely.patch
Patch1:		mozc-fix-model-path-for-zinnia.patch
Patch2:		mozc-no-Werror.patch
# http://code.google.com/p/mozc/issues/detail?id=189
Patch3:		%{name}-fix-use-libprotobuf.patch

BuildRequires:	python gettext
BuildRequires:	openssl-devel libstdc++-devel zlib-devel libxcb-devel protobuf-devel glib2-devel qt-devel zinnia-devel gtk2-devel
BuildRequires:	gyp >= 0.1-0.4.840svn
BuildRequires:	ibus-devel >= 1.4.1
BuildRequires:	emacs
BuildRequires:	xemacs xemacs-packages-extra

Requires:	zinnia-tomoe

%description
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

%package	-n ibus-mozc
Summary:	The mozc engine for IBus input platform
Group:		System Environment/Libraries
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	ibus%{?_isa}

%description	-n ibus-mozc
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the Input Method Engine for IBus.

%package	-n emacs-common-mozc
Summary:	Common files to run mozc under Emacsen
Group:		System Environment/Libraries
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	-n emacs-common-mozc
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the files common to both the GNU Emacs
and XEmacs mozc packages.

%package	-n emacs-mozc
Summary:	Compiled elisp files to run mozc under GNU Emacs
Group:		System Environment/Libraries
Requires:	emacs(bin) >= %{_emacs_version}
Requires:	emacs-common-mozc = %{version}-%{release}
BuildArch:	noarch

%description	-n emacs-mozc
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the byte compiled elisp files to run mozc with GNU Emacs.

%package	-n emacs-mozc-el
Summary:	Elisp source files for mozc under GNU Emacs
Group:		System Environment/Libraries
Requires:	emacs-mozc = %{version}-%{release}
BuildArch:	noarch

%description	-n emacs-mozc-el
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the elisp source files for mozc under GNU Emacs. You
do not need to install this package to run mozc. Install the emacs-mozc package
to use mozc with GNU Emacs.

%package	-n xemacs-mozc
Summary:	Compiled elisp files to run mozc under XEmacs
Group:		System Environment/Libraries
Requires:	xemacs(bin) >= %{_xemacs_version}
Requires:	xemacs-packages-extra
Requires:	emacs-common-mozc = %{version}-%{release}
BuildArch:	noarch

%description	-n xemacs-mozc
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the byte compiled elisp files to run mozc with XEmacs.

%package	-n xemacs-mozc-el
Summary:	Elisp source files for mozc under XEmacs
Group:		System Environment/Libraries
Requires:	xemacs-mozc = %{version}-%{release}
BuildArch:	noarch

%description	-n xemacs-mozc-el
Mozc is a Japanese Input Method Editor (IME) designed for
multi-platform such as Chromium OS, Windows, Mac and Linux.

This package contains the elisp source files for mozc under XEmacs. You
do not need to install this package to run mozc. Install the xemacs-mozc package
to use mozc with XEmacs.

%prep
%setup -q -a 2 -a 3
%patch0 -p1 -b .0-build-verbosely
%patch1 -p1 -b .1-fix-zinnia
%patch2 -p1 -b .2-no-Werror
%patch3 -p0 -b .3-use-libprotobuf
(cd data/dictionary_oss;
python ../../dictionary/gen_zip_code_seed.py --zip_code=../../KEN_ALL.CSV --jigyosyo=../../JIGYOSYO.CSV >> dictionary09.txt;
)


%build
GYP_DEFINES="use_libprotobuf=1" python build_mozc.py gyp --gypdir=%{_bindir} --server_dir=%{_libexecdir}/mozc
python build_mozc.py build_tools -c Release
python build_mozc.py build -c Release unix/ibus/ibus.gyp:ibus_mozc unix/emacs/emacs.gyp:mozc_emacs_helper server/server.gyp:mozc_server gui/gui.gyp:mozc_tool renderer/renderer.gyp:mozc_renderer


%install
install -d $RPM_BUILD_ROOT%{_libexecdir}/mozc
install -d $RPM_BUILD_ROOT%{_libexecdir}/mozc/documents
install -p -m0755 out_linux/Release/mozc_server $RPM_BUILD_ROOT%{_libexecdir}/mozc
install -p -m0755 out_linux/Release/mozc_tool $RPM_BUILD_ROOT%{_libexecdir}/mozc
install -p -m0755 out_linux/Release/mozc_renderer $RPM_BUILD_ROOT%{_libexecdir}/mozc
install -p -m0644 data/installer/credits_{en,ja}.html $RPM_BUILD_ROOT%{_libexecdir}/mozc/documents

# ibus-mozc
install -d $RPM_BUILD_ROOT%{_datadir}/ibus/component
install -d $RPM_BUILD_ROOT%{_datadir}/ibus-mozc
install -p -m0755 out_linux/Release/ibus_mozc $RPM_BUILD_ROOT%{_libexecdir}/ibus-engine-mozc
install -p -m0644 out_linux/Release/obj/gen/unix/ibus/mozc.xml $RPM_BUILD_ROOT%{_datadir}/ibus/component/
(cd data/images/unix;
install -p -m0644 ime_product_icon_opensource-32.png $RPM_BUILD_ROOT%{_datadir}/ibus-mozc/product_icon.png
for i in ui-*.png; do
	install -p -m0644 $i $RPM_BUILD_ROOT%{_datadir}/ibus-mozc/${i//ui-/}
done)
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications  %{SOURCE4}

# emacs-common-mozc
install -d $RPM_BUILD_ROOT%{_bindir}
install -p -m0755 out_linux/Release/mozc_emacs_helper $RPM_BUILD_ROOT%{_bindir}

# emacs-mozc*
install -d $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg}
install -d $RPM_BUILD_ROOT%{_emacs_sitestartdir}
install -p -m0644 unix/emacs/mozc.el $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg}
install -p -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_emacs_sitestartdir}

emacs -batch -f batch-byte-compile $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg}/mozc.el

# xemacs-mozc*
install -d $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{pkg}
install -d $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
install -p -m0644 unix/emacs/mozc.el $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{pkg}
install -p -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_xemacs_sitestartdir}

xemacs -batch -f batch-byte-compile $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{pkg}/mozc.el


%files
%dir %{_libexecdir}/mozc
%{_libexecdir}/mozc/mozc_server
%{_libexecdir}/mozc/mozc_tool
%{_libexecdir}/mozc/documents

%files	-n ibus-mozc
%dir %{_datadir}/ibus-mozc
%{_libexecdir}/ibus-engine-mozc
%{_libexecdir}/mozc/mozc_renderer
%{_datadir}/applications/ibus-setup-mozc-jp.desktop
%{_datadir}/ibus/component/mozc.xml
%{_datadir}/ibus-mozc/*.png

%files	-n emacs-common-mozc
%{_bindir}/mozc_emacs_helper

%files	-n emacs-mozc
%dir %{_emacs_sitelispdir}/%{pkg}
%{_emacs_sitelispdir}/%{pkg}/*.elc
%{_emacs_sitestartdir}/*.el

%files	-n emacs-mozc-el
%{_emacs_sitelispdir}/%{pkg}/*.el

%files	-n xemacs-mozc
%dir %{_xemacs_sitelispdir}/%{pkg}
%{_xemacs_sitelispdir}/%{pkg}/*.elc
%{_xemacs_sitestartdir}/*.el

%files	-n xemacs-mozc-el
%{_xemacs_sitelispdir}/%{pkg}/*.el

%changelog
* Mon Apr 15 2013 Akira TAGOH <tagoh@redhat.com> - 1.10.1390.102-1
- New upstream release. (#328711)
- Move credit text since it was referenced by the program at runtime.

* Thu Mar 28 2013 Akira TAGOH <tagoh@redhat.com> - 1.10.1389.102-1
- New upstream release. (#928711)
- Improve the spec file (#891078)

* Wed Mar 13 2013 Akira TAGOH <tagoh@redhat.com> - 1.6.1187.102-4
- Apply an upstream patch to fix a text property for menus (#920122)
- Update zipcode dictionaries.

* Tue Mar 12 2013 Akira TAGOH <tagoh@redhat.com> - 1.6.1187.102-3
- Rebuild against latest protobuf.

* Mon Jan 28 2013 Akira TAGOH <tagoh@redhat.com> - 1.6.1187.102-2
- Add ibus-setup-mozc-jp.desktop to make the configuration tool accessible
  from the input source configuration on control-center. (#904625)
- Updated License, BR, and Summary. partially fixes of #891078

* Fri Aug 31 2012 Akira TAGOH <tagoh@redhat.com> - 1.6.1187.102-1
- New upstream release. (#853362)
  - no SCIM support anymore.
- Update zipcode dictionaries.

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1090.102-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jun  7 2012 Akira TAGOH <tagoh@redhat.com> - 1.5.1090.102-2
- Enable mozc_renderer.

* Tue Jun  5 2012 Akira TAGOH <tagoh@redhat.com> - 1.5.1090.102-1
- New upstream release. (#828202)
- Update zipcode dictionaries.
- set "default" to the layout in mozc.xml to avoid adding jp keyboard layout
  unexpectedly.

* Thu Apr 26 2012 Akira TAGOH <tagoh@redhat.com> - 1.5.1053.102-1
- New upstream release. (#816526)
- Update zipcode dictionaries.

* Mon Mar 26 2012 Akira TAGOH <tagoh@redhat.com> - 1.4.1033.102-1
- New upstream release.

* Thu Mar 22 2012 Akira TAGOH <tagoh@redhat.com> - 1.4.1003.102-2
- Rebuild against new ibus.

* Thu Mar  8 2012 Akira TAGOH <tagoh@redhat.com> - 1.4.1003.102-1
- New upstream release.
- Update zipcode dictionaries.

* Wed Mar  7 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.975.102-3
- Rebuild for ibus 1.4.99.20120304

* Mon Feb 27 2012 Akira TAGOH <tagoh@redhat.com> - 1.3.975.102-2
- Fix docdir.

* Mon Feb 13 2012 Akira TAGOH <tagoh@redhat.com> - 1.3.975.102-1
- New upstream release.
- Update zipcode dictionaries.

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.930.102-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Dec 21 2011 Akira TAGOH <tagoh@redhat.com> - 1.3.930.102-1
- New upstream release.

* Thu Dec  1 2011 Akira TAGOH <tagoh@redhat.com> - 1.3.911.102-1
- New upstream release.

* Tue Nov 29 2011 Akira TAGOH <tagoh@redhat.com> - 1.2.855.102-2
- Add zipcode dictionary.

* Tue Nov 15 2011 Akira TAGOH <tagoh@redhat.com> - 1.2.855.102-1
- New upstream release.

* Fri Sep 30 2011 Akira TAGOH <tagoh@redhat.com> - 1.2.831.102-1
- New upstream release.

* Wed Aug 17 2011 Akira TAGOH <tagoh@redhat.com> - 1.2.809.102-1
- New upstream release.

* Thu Aug 11 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.773.102-3
- Re-enable hotkeys support and add a symbol. (#727022)

* Thu Jul 21 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.773.102-1
- New upstream release.

* Mon Jul 11 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.758.102-2
- Revert hotkeys patch.

* Mon Jul  4 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.758.102-1
- New upstream release.

* Mon Jun 13 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.717.102-3
- Rebuild against new protobuf.

* Wed Jun  1 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.717.102-2
- Fix broken emacs-mozc package.

* Mon May 23 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.717.102-1
- New upstream release.

* Wed Apr 20 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.690.102-0.2.20110419svn
- Fix a wrong path to the model file for handwriting.
- add dep to zinnia-tomoe.

* Tue Apr 19 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.690.102-0.1.20110419svn
- Update to 1.1.690.102.

* Tue Mar  8 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.626.102-0.2.20110301svn
- Fix mozc.el not working when byte-compiled.

* Wed Mar  2 2011 Akira TAGOH <tagoh@redhat.com> - 1.1.626.102-0.1.20110301svn
- Update to 1.1.626.102.

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.558.102-0.2.20101216svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Dec 16 2010 Akira TAGOH <tagoh@redhat.com> - 1.0.558.102-0.1.20101216svn
- Update to 1.0.558.102.

* Mon Nov  8 2010 Akira TAGOH <tagoh@redhat.com> - 0.13.523.102-0.2.20101104svn
- Rebuilt against ibus-1.3.99.

* Thu Nov  4 2010 Akira TAGOH <tagoh@redhat.com> - 0.13.523.102-0.1.20101104svn
- Update to 0.13.523.102.

* Fri Oct  8 2010 Akira TAGOH <tagoh@redhat.com> - 0.13.499.102-0.1.20101008svn
- Update to 0.13.499.102.

* Mon Sep 27 2010 Akira TAGOH <tagoh@redhat.com> - 0.13.481.102-0.1.20100927svn
- Update to 0.13.481.102.
- Add emacs-common-mozc, emacs-mozc, emacs-mozc-el, xemacs-mozc and xemacs-mozc-el subpackage.

* Fri Sep 10 2010 Akira TAGOH <tagoh@redhat.com> - 0.13.464.102-0.1.20100910svn
- Update to 0.13.464.102.

* Mon Aug 23 2010 Akira TAGOH <tagoh@redhat.com> - 0.12.434.102-0.2.20100823svn
- Drop the unnecessary Obsoletes tag.
- Output more build messages. (Mamoru Tasaka)
- Own %%{_datadir}/ibus-mozc
- add credits_*.html
- rebase to drop more exec bits.

* Fri Aug 20 2010 Akira TAGOH <tagoh@redhat.com> - 0.12.434.102-0.1.20100820svn
- drop exec bits for source code.
- clean up spec file.
- add mecab-ipadic to License tag.

* Tue Aug 17 2010 Akira TAGOH <tagoh@redhat.com> - 0.12.434.102-0.1.20100817svn
- Update to 0.12.434.102.

* Thu Jul 29 2010 Akira TAGOH <tagoh@redhat.com> - 0.12.422.102-0.1.20100729svn
- Update to 0.12.422.102.

* Mon Jul 12 2010 Akira TAGOH <tagoh@redhat.com> - 0.12.410.102-0.1.20100712svn
- Update to 0.12.410.102.

* Tue Jun 22 2010 Akira TAGOH <tagoh@redhat.com> - 0.11.383.102-0.1.20100621svn
- Update to 0.11.383.102.
- Add a subpackage for scim.

* Thu May 27 2010 Akira TAGOH <tagoh@redhat.com> - 0.11.365.102-0.1.20100527svn
- Update to 0.11.365.102.
- Update mozc-config.
- correct the server directory.

* Thu May 20 2010 Akira TAGOH <tagoh@redhat.com> - 0.11.354.100-0.1.20100520svn
- Updates from svn.
- Add mozc-config from git.

* Tue May 11 2010 Akira TAGOH <tagoh@redhat.com> - 0.10.288.102-0.1.20100511svn
- Initial build.