Browse Source

mozc:
- update to 1.12.1599.102
- add fcitx support

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7988 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 10 years ago
parent
commit
6f68ecea8e
1 changed files with 65 additions and 11 deletions
  1. 65 11
      m/mozc/mozc-vl.spec

+ 65 - 11
m/mozc/mozc-vl.spec

@@ -1,4 +1,4 @@
-%define		ver	1.10.1390.102
+%define		ver	1.12.1599.102
 %define		rel	1
 
 # if you want to make scim-mozc package, rpm --define with_scim:1
@@ -27,14 +27,16 @@ Source3:	%{name}-remove.sh
 Source4:	vine-default-%{name}.el
 Source5:	%{name}-init.el
 
-Source6:	protobuf-2.5.0-r497.tar.bz2
-
-Patch2:         mozc-no-Werror.patch
+#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
@@ -48,16 +50,18 @@ 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}
-Requires:	ibus-mozc = %{version}-%{release}
 
 Distribution: Vine Linux
 Vendor: Project Vine
@@ -91,7 +95,7 @@ Mozc インプットメソッドのサーバ部分。ibus-mozcなどのMozcク
 Summary:	iBus engine module for Mozc
 Summary(ja):	Mozc 用 iBus エンジンモジュール
 Group:		System Environment/Libraries 
-Requires:	mozc-server = %{version}-%{release}
+Requires:	mozc = %{version}-%{release}
 
 %description -n ibus-mozc
 iBus engine module for Mozc.
@@ -99,12 +103,13 @@ 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 IMEngine モジュール
+Summary(ja):	Mozc 用 SCIM IM エンジンモジュール
 Group:		System Environment/Libraries 
-Requires:	mozc-server = %{version}-%{release}
+Requires:	mozc = %{version}-%{release}
 Requires:	scim gtk2
 
 %description -n scim-mozc
@@ -115,6 +120,21 @@ 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 ユーティリティー
@@ -145,9 +165,7 @@ Emacs Lisp frontend for Mozc
 Mozc のための Emacs-lisp フロントエンド
 
 %prep
-%setup -q -a 6 -a 20 -a 21
-
-%patch2 -p1 -b .2-no-Werror
+%setup -q -a 20 -a 21 -a 15
 
 %patch10 -p1 -b .japanese
 %{__cp} -p %{SOURCE1} COPYING
@@ -155,12 +173,16 @@ Mozc のための Emacs-lisp フロントエンド
   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" \
 %{__python} build_mozc.py gyp \
   --gypdir=%{_bindir} \
   --server_dir=%{_libexecdir}
@@ -172,6 +194,7 @@ unset QTDIR
 	    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 \
@@ -216,6 +239,21 @@ for i in ui-*.png; do
 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}
@@ -302,6 +340,17 @@ fi
 %{_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
@@ -312,6 +361,11 @@ fi
 
 
 %changelog
+* Wed Nov 13 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 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 <daisuke@linux.or.jp> 1.10.1390.102-1
 - new upstream release
 - use internal protobuf (add Source10)