/[packages]/updates/2/mozc/current/SPECS/mozc.spec
ViewVC logotype

Contents of /updates/2/mozc/current/SPECS/mozc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 394910 - (show annotations) (download)
Wed Feb 6 19:51:05 2013 UTC (7 years, 6 months ago) by fwang
File size: 3345 byte(s)
fix usage of libexec
1 Name: mozc
2 Summary: Japanese Input Method Editor designed for multi-platform
3 Version: 1.3.975.102
4 Release: %mkrel 1
5 Group: System/Internationalization
6 License: BSD-like
7 URL: http://code.google.com/p/mozc/
8 Source0: http://mozc.googlecode.com/files/mozc-%{version}.tar.bz2
9 # zipcode from Japan Post
10 # http://www.post.japanpost.jp/zipcode/download.html
11 Source2: KEN_ALL.CSV
12 Source3: JIGYOSYO.CSV
13 BuildRequires: python-devel
14 BuildRequires: ibus-devel >= 1.3.9
15 BuildRequires: dbus-devel
16 BuildRequires: openssl-devel
17 BuildRequires: zlib-devel
18 BuildRequires: subversion
19 BuildRequires: curl-devel
20 BuildRequires: gtest-devel
21 BuildRequires: protobuf-devel
22 BuildRequires: qt4-devel
23 BuildRequires: zinnia-devel
24 BuildRequires: pkgconfig(xrandr)
25 BuildRequires: pkgconfig(xcursor)
26 BuildRequires: pkgconfig(xinerama)
27 BuildRequires: pkgconfig(xt)
28
29 %description
30 Mozc is a Japanese Input Method Editor (IME) designed for
31 multi-platform such as Chromium OS, Windows, Mac and Linux.
32 This open-source project originates from Google Japanese Input.
33
34 %package -n ibus-mozc
35 Group: System/Internationalization
36 Summary: Ibus - mozc engine
37 Requires(post,preun): GConf2
38 Requires: ibus
39 Requires: mozc = %{version}
40
41 %description -n ibus-mozc
42 ibus - mozc engine.
43
44 %post -n ibus-%{name}
45 %post_ibus_register_engine mozc ja
46
47 %preun -n ibus-%{name}
48 %preun_ibus_unregister_engine mozc
49
50 %package tools
51 Group: System/Internationalization
52 Summary: Mozc config tools
53 Requires: mozc = %{version}
54 Requires: qt4-common
55
56 %description tools
57 Mozc config tools.
58
59 %prep
60 %setup -q -n mozc-%{version}
61
62 # prepare the zipcode dictionary
63 cp %SOURCE2 data/dictionary/
64 cp %SOURCE3 data/dictionary/
65
66 cd data/dictionary/
67 %__python ../../dictionary/gen_zip_code_seed.py \
68 --zip_code=KEN_ALL.CSV --jigyosyo=JIGYOSYO.CSV > ./zip_code_seed.tsv
69 cd -
70
71 # fix for x86_64
72 sed 's|/usr/lib/mozc|%_libexecdir/mozc|' < base/util.cc > base/util.cc.new
73 mv -f base/util.cc.new base/util.cc
74
75 %build
76
77 %setup_compile_flags
78 %__python build_mozc.py gyp
79 %__python build_mozc.py build_tools -c Release
80 %__python build_mozc.py build unix/ibus/ibus.gyp:ibus_mozc server/server.gyp:mozc_server gui/gui.gyp:mozc_tool -c Release
81
82 %install
83 rm -rf %buildroot
84
85 # install ibus-mozc
86 mkdir -p %buildroot/%_libexecdir/ibus-mozc
87 cp -p out_linux/Release/ibus_mozc %buildroot/%_libexecdir/ibus-mozc/ibus-engine-mozc
88 mkdir -p %buildroot/%_datadir/ibus/component/
89 sed 's|/usr/libexec/ibus-engine-mozc|%_libexecdir/ibus-mozc/ibus-engine-mozc|' < out_linux/Release/obj/gen/unix/ibus/mozc.xml > %buildroot/%_datadir/ibus/component/mozc.xml
90
91 pushd data/images/unix
92 mkdir -p %{buildroot}%{_datadir}/ibus-mozc
93 install -p -m0644 ime_product_icon_opensource-32.png %{buildroot}%{_datadir}/ibus-mozc/product_icon.png
94 for i in ui-*.png; do
95 install -p -m0644 $i %{buildroot}%{_datadir}/ibus-mozc/${i//ui-/}
96 done
97 popd
98
99 # install mozc-server
100 mkdir -p %buildroot/%_libexecdir/mozc/
101 cp -p out_linux/Release/mozc_server %buildroot/%_libexecdir/mozc/
102
103 # install mozc-tools
104 cp -p out_linux/Release/mozc_tool %buildroot/%_libexecdir/mozc/
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %files
110 %defattr(-,root,root)
111 %{_libexecdir}/mozc/mozc_server
112
113 %files -n ibus-mozc
114 %defattr(-,root,root)
115 %{_libexecdir}/ibus-mozc/ibus-engine-mozc
116 %{_datadir}/ibus/component/mozc.xml
117 %{_datadir}/ibus-mozc
118
119 %files tools
120 %defattr(-,root,root)
121 %{_libexecdir}/mozc/mozc_tool
122
123

  ViewVC Help
Powered by ViewVC 1.1.28