|
@@ -1,49 +1,48 @@
|
|
|
-%define ver 2.17.2077.102
|
|
|
-%define rel 3
|
|
|
-
|
|
|
# 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)
|
|
|
+%define scim_dir %(pkg-config --variable=moduledir scim)
|
|
|
%endif
|
|
|
-%define mozc_el mozc-el
|
|
|
+%define mozc_el mozc-el
|
|
|
+
|
|
|
+%global _metainfodir %{_datadir}/metainfo
|
|
|
|
|
|
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
|
|
|
+Version: 2.26.4486.102
|
|
|
+Release: 1%{?_dist_release}
|
|
|
+Group: localization
|
|
|
+Distribution: Vine Linux
|
|
|
+Vendor: Project Vine
|
|
|
+Packager: kazutaka, daisuke
|
|
|
+
|
|
|
+License: BSD and ASL 2.0 and UCD and Public Domain and mecab-ipadic
|
|
|
+URL: https://github.com/google/mozc
|
|
|
Source0: %{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: ibus-setup-mozc-jp.desktop
|
|
|
|
|
|
-#Source6: protobuf-2.5.0-r497.tar.bz2
|
|
|
+Source1000: get-tarball.sh
|
|
|
|
|
|
# build patch
|
|
|
-Patch1: mozc-build-gcc.patch
|
|
|
-Patch2: mozc-build-verbosely.patch
|
|
|
-
|
|
|
-Patch5: mozc-build-pthread.patch
|
|
|
+Patch0: mozc-build-ninja.patch
|
|
|
+Patch1: mozc-build-gcc.patch
|
|
|
+Patch2: mozc-build-verbosely.patch
|
|
|
+Patch3: mozc-build-id.patch
|
|
|
+Patch4: mozc-build-gcc-common.patch
|
|
|
|
|
|
# Vine Lunux
|
|
|
Source10: README.vine
|
|
|
-Patch10: mozc-1.10.1390.102-ibus-japanese.patch
|
|
|
-Patch11: mozc-ibus-allways-active.patch
|
|
|
|
|
|
# fcitx-mozc
|
|
|
-Patch15: fcitx-mozc-2.17.2313.102.1.patch
|
|
|
+Patch15: fcitx-mozc-2.26.4486.102.patch
|
|
|
Source15: fcitx-mozc-icon.tar.gz
|
|
|
|
|
|
# japanpost
|
|
@@ -51,15 +50,17 @@ 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, python-devel, ibus-devel, dbus-devel
|
|
|
+BuildRequires: git
|
|
|
+BuildRequires: python3, python3-devel, ibus-devel, dbus-devel
|
|
|
BuildRequires: openssl-devel, zlib-devel
|
|
|
BuildRequires: curl-devel
|
|
|
BuildRequires: gtest-devel
|
|
|
-BuildRequires: qt4-devel
|
|
|
+BuildRequires: qt5-qtbase-devel
|
|
|
BuildRequires: gyp
|
|
|
BuildRequires: pkgconfig
|
|
|
BuildRequires: gtk2-devel
|
|
|
BuildRequires: protobuf-devel
|
|
|
+BuildRequires: desktop-file-utils
|
|
|
BuildRequires: ninja >= 1.6.0
|
|
|
%if %{with_scim}
|
|
|
# for scim-mozc
|
|
@@ -71,11 +72,6 @@ BuildRequires: zinnia-devel
|
|
|
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
|
|
@@ -88,10 +84,12 @@ Chromium OS や Windows、Mac、Linux といったマルチプラット
|
|
|
フォームで利用できるようにデザインされており、「Google日本語
|
|
|
入力」のオープンソース版です。
|
|
|
|
|
|
+
|
|
|
%package server
|
|
|
Summary: Server part of the Mozc input method
|
|
|
Summary(ja): Mozc インプットメソッドのサーバ部分
|
|
|
-Group: Applications/System
|
|
|
+Group: localization
|
|
|
+Obsoletes: mozc-utils-gui < %{version}-%{release}
|
|
|
|
|
|
%description server
|
|
|
Server part of the Mozc input method, used by Mozc clients such as
|
|
@@ -101,10 +99,11 @@ ibus-mozc.
|
|
|
Mozc インプットメソッドのサーバ部分。ibus-mozcなどのMozcクライアントから
|
|
|
使うことができます。
|
|
|
|
|
|
+
|
|
|
%package -n ibus-mozc
|
|
|
Summary: iBus engine module for Mozc
|
|
|
Summary(ja): Mozc 用 iBus エンジンモジュール
|
|
|
-Group: System Environment/Libraries
|
|
|
+Group: localization
|
|
|
Requires: mozc = %{version}-%{release}
|
|
|
|
|
|
%description -n ibus-mozc
|
|
@@ -118,7 +117,7 @@ Mozc 用 iBus エンジンモジュール。
|
|
|
%package -n scim-mozc
|
|
|
Summary: SCIM IMEngine module for Mozc
|
|
|
Summary(ja): Mozc 用 SCIM IM エンジンモジュール
|
|
|
-Group: System Environment/Libraries
|
|
|
+Group: localization
|
|
|
Requires: mozc = %{version}-%{release}
|
|
|
Requires: scim gtk2
|
|
|
|
|
@@ -127,14 +126,13 @@ 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
|
|
|
+Group: localization
|
|
|
Requires: mozc = %{version}-%{release}
|
|
|
Requires: fcitx
|
|
|
|
|
@@ -145,21 +143,6 @@ Fcitx IMEngine module for Mozc.
|
|
|
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 フロントエンド
|
|
@@ -174,29 +157,52 @@ Emacs Lisp frontend for Mozc
|
|
|
%description -n %{mozc_el} -l ja
|
|
|
Mozc のための Emacs-lisp フロントエンド
|
|
|
|
|
|
+
|
|
|
+%debug_package
|
|
|
+
|
|
|
+
|
|
|
%prep
|
|
|
%setup -q -c -n %{name}-%{version} -a 20 -a 21 -a 15
|
|
|
+pushd src
|
|
|
+%patch0 -p1 -b .0-ninja
|
|
|
+%patch1 -p1 -b .1-gcc
|
|
|
+%patch2 -p1 -b .2-verbose
|
|
|
+%patch3 -p1 -b .3-build-id
|
|
|
+%patch4 -p1 -b .8-gcc-common
|
|
|
+
|
|
|
+sed -i \
|
|
|
+ -e 's/"Direct input"/"直接入力"/' \
|
|
|
+ -e 's/"Hiragana"/"ひらがな"/' \
|
|
|
+ -e 's/"Katakana"/"全角カタカナ"/' \
|
|
|
+ -e 's/"Latin"/"半角英数"/' \
|
|
|
+ -e 's/"Wide Latin"/"全角英数"/' \
|
|
|
+ -e 's/"Half width katakana"/"半角カタカナ"/' \
|
|
|
+ -e 's/"Properties"/"プロパティ"/' \
|
|
|
+ -e 's/"Dictionary Tool"/"辞書ツール"/' \
|
|
|
+ -e 's/"Add Word"/"単語登録"/' \
|
|
|
+ -e 's/"Handwriting"/"手書き文字認識"/' \
|
|
|
+ -e 's/"Character Palette"/"文字パレット"/' \
|
|
|
+ -e 's/"About Mozc"/"Mozcについて"/' \
|
|
|
+ unix/ibus/mozc_engine_property.cc
|
|
|
|
|
|
-%patch1 -p1 -b .gcc
|
|
|
-%patch2 -p1 -b .verbose
|
|
|
-%patch5 -p1 -b .remove-pthread
|
|
|
-
|
|
|
-%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;
|
|
|
+PYTHONPATH="${PYTHONPATH}:../.." python3 ../../dictionary/gen_zip_code_seed.py --zip_code=../../../KEN_ALL.CSV --jigyosyo=../../../JIGYOSYO.CSV >> dictionary09.txt;
|
|
|
)
|
|
|
-
|
|
|
# fcitx
|
|
|
-%patch15 -p2
|
|
|
-
|
|
|
-%patch11 -p1 -b .ibus_allways_on
|
|
|
+git init
|
|
|
+git config user.email "Vine@vinelinux.org"
|
|
|
+git config user.name "Vine Linux Build System"
|
|
|
+git add .
|
|
|
+git commit -m "pre-patch"
|
|
|
+git apply -p2 %{PATCH15}
|
|
|
|
|
|
# update execute files path
|
|
|
%{__sed} -i -e "s|/usr/lib/mozc|%{_libexecdir}|g" base/const.h
|
|
|
+popd
|
|
|
|
|
|
|
|
|
%build
|
|
|
+pushd src
|
|
|
# replace compiler flags to build with the proper debugging information
|
|
|
t=$(mktemp /tmp/mozc.gyp-XXXXXXXX)
|
|
|
opts=$(for i in $RPM_OPT_FLAGS; do
|
|
@@ -209,14 +215,16 @@ p;b b};n;b a;};{p};:b" gyp/common.gypi > $t && mv $t gyp/common.gypi || exit 1
|
|
|
|
|
|
unset QTDIR
|
|
|
GYP_DEFINES="use_libprotobuf=1
|
|
|
+ use_fcitx5=NO
|
|
|
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 \
|
|
|
+%{__python3} build_mozc.py gyp \
|
|
|
--gypdir=%{_bindir} \
|
|
|
- --server_dir=%{_libexecdir}
|
|
|
+ --server_dir=%{_libexecdir}/mozc \
|
|
|
+ --target_platform=Linux
|
|
|
|
|
|
-%{__python} build_mozc.py build -c Release \
|
|
|
+%{__python3} build_mozc.py build -c Release \
|
|
|
unix/ibus/ibus.gyp:ibus_mozc \
|
|
|
%if %{with_scim}
|
|
|
unix/scim/scim.gyp:scim_mozc \
|
|
@@ -227,11 +235,14 @@ GYP_DEFINES="use_libprotobuf=1
|
|
|
server/server.gyp:mozc_server \
|
|
|
gui/gui.gyp:mozc_tool \
|
|
|
renderer/renderer.gyp:mozc_renderer
|
|
|
+popd
|
|
|
+
|
|
|
|
|
|
%install
|
|
|
%{__rm} -rf %{buildroot}
|
|
|
+pushd src
|
|
|
%{__mkdir_p} %{buildroot}%{_libdir}
|
|
|
-%{__mkdir_p} %{buildroot}%{_libexecdir}
|
|
|
+%{__mkdir_p} %{buildroot}%{_libexecdir}/mozc
|
|
|
|
|
|
%define output_dir out_linux/Release
|
|
|
|
|
@@ -249,7 +260,9 @@ 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}
|
|
|
+%{__cp} -p %{output_dir}/mozc_renderer %{buildroot}%{_libexecdir}/mozc
|
|
|
+
|
|
|
+desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE6}
|
|
|
|
|
|
%if %{with_scim}
|
|
|
# scim-mozc
|
|
@@ -280,19 +293,19 @@ for i in *.mo; do
|
|
|
%{__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/
|
|
|
+%{__cp} -p ../fcitx-mozc-icons/*.png %{buildroot}%{_datadir}/fcitx/mozc/icon/
|
|
|
|
|
|
|
|
|
# mozc-server
|
|
|
-%{__cp} -p %{output_dir}/mozc_server %{buildroot}%{_libexecdir}
|
|
|
+%{__cp} -p %{output_dir}/mozc_server %{buildroot}%{_libexecdir}/mozc
|
|
|
|
|
|
# mozc_tool
|
|
|
-%{__cp} -p %{output_dir}/mozc_tool %{buildroot}%{_libexecdir}
|
|
|
+%{__cp} -p %{output_dir}/mozc_tool %{buildroot}%{_libexecdir}/mozc
|
|
|
|
|
|
|
|
|
|
|
|
# mozc-el
|
|
|
-%{__cp} -p %{output_dir}/mozc_emacs_helper %{buildroot}%{_libexecdir}
|
|
|
+%{__cp} -p %{output_dir}/mozc_emacs_helper %{buildroot}%{_libexecdir}/mozc
|
|
|
mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{name}/packages
|
|
|
mkdir -p %{buildroot}%{emacsen_pkgdir}/install
|
|
|
mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
|
|
@@ -304,9 +317,48 @@ cp -p unix/emacs/mozc.el %{SOURCE4} %{SOURCE5} %{buildroot}%{_datadir}/emacs/sit
|
|
|
|
|
|
%_removeemacsenscript %{name} %{SOURCE3}
|
|
|
|
|
|
+popd
|
|
|
+
|
|
|
# install document
|
|
|
%{__cp} %{SOURCE10} .
|
|
|
|
|
|
+# Register as an AppStream component to be visible in the software center
|
|
|
+#
|
|
|
+# NOTE: It would be *awesome* if this file was maintained by the upstream
|
|
|
+# project, translated and installed into the right place during `make install`.
|
|
|
+#
|
|
|
+# See http://www.freedesktop.org/software/appstream/docs/ for more details.
|
|
|
+#
|
|
|
+install -d -m 0755 %{buildroot}%{_metainfodir}
|
|
|
+cat > %{buildroot}%{_metainfodir}/mozc.appdata.xml <<EOF
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<component type="inputmethod">
|
|
|
+ <id>mozc.xml</id>
|
|
|
+ <metadata_license>CC0-1.0</metadata_license>
|
|
|
+ <name>Mozc</name>
|
|
|
+ <summary>Japanese input method</summary>
|
|
|
+ <description>
|
|
|
+ <p>
|
|
|
+ The Mozc input method is designed for entering Japanese text.
|
|
|
+ It is multi-platform and is available on Chromium OS, Windows, Mac and Linux.
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ Input methods are typing systems allowing users to input complex languages.
|
|
|
+ They are necessary because these contain too many characters to simply be laid
|
|
|
+ out on a traditional keyboard.
|
|
|
+ </p>
|
|
|
+ </description>
|
|
|
+ <url type="homepage">https://github.com/google/mozc</url>
|
|
|
+ <url type="bugtracker">https://github.com/google/mozc/issues</url>
|
|
|
+ <url type="help"><!-- https://code.google.com/p/ibus/wiki/FAQ --></url>
|
|
|
+ <languages>
|
|
|
+ <lang percentage="100">ja</lang>
|
|
|
+ </languages>
|
|
|
+ <update_contact><!-- upstream-contact_at_email.com --></update_contact>
|
|
|
+</component>
|
|
|
+EOF
|
|
|
+
|
|
|
+
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
@@ -335,34 +387,33 @@ if [ "$1" = 0 ]; then
|
|
|
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%doc COPYING README.vine CONTRIBUTORS
|
|
|
+%doc 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
|
|
|
+%doc README.vine
|
|
|
+%dir %{_libexecdir}/mozc
|
|
|
+%{_libexecdir}/mozc/mozc_server
|
|
|
|
|
|
%files -n ibus-mozc
|
|
|
%defattr(-,root,root)
|
|
|
-%doc COPYING
|
|
|
%{_libexecdir}/ibus-engine-mozc
|
|
|
-%{_libexecdir}/mozc_renderer
|
|
|
+%dir %{_libexecdir}/mozc
|
|
|
+%{_libexecdir}/mozc/mozc_renderer
|
|
|
+%{_libexecdir}/mozc/mozc_tool
|
|
|
%{_datadir}/ibus/component/mozc.xml
|
|
|
%dir %{_datadir}/ibus-mozc
|
|
|
%dir %{_datadir}/ibus-mozc/setup
|
|
|
%{_datadir}/ibus-mozc/*.png
|
|
|
+%{_datadir}/applications/ibus-setup-mozc-jp.desktop
|
|
|
+%{_metainfodir}/*.appdata.xml
|
|
|
|
|
|
%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
|
|
@@ -370,7 +421,6 @@ fi
|
|
|
|
|
|
%files -n fcitx-mozc
|
|
|
%defattr(-,root,root)
|
|
|
-%doc COPYING
|
|
|
%{_libdir}/fcitx/*.so
|
|
|
%{_datadir}/fcitx/addon/fcitx-mozc.conf
|
|
|
%{_datadir}/fcitx/inputmethod/mozc.conf
|
|
@@ -381,14 +431,17 @@ fi
|
|
|
|
|
|
%files -n %{mozc_el}
|
|
|
%defattr(-,root,root)
|
|
|
-%doc COPYING
|
|
|
-%{_libexecdir}/mozc_emacs_helper
|
|
|
+%{_libexecdir}/mozc/mozc_emacs_helper
|
|
|
%{_datadir}/emacs/site-lisp/%{name}
|
|
|
%{emacsen_pkgdir}/install/%{name}
|
|
|
%{emacsen_pkgdir}/remove/%{name}
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Sep 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.26.4486.102-1
|
|
|
+- new upstream release.
|
|
|
+- dropped mozc-utils-gui.
|
|
|
+
|
|
|
* Thu Feb 15 2018 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.17.2077.102-3
|
|
|
- rebuilt
|
|
|
|