1 |
Summary: Fcitx - Free Chinese Input Toys for X |
2 |
Name: fcitx |
3 |
Version: 4.2.0 |
4 |
Release: %mkrel 1 |
5 |
License: GPL |
6 |
Group: System/Internationalization |
7 |
URL: http://code.google.com/p/fcitx/ |
8 |
Source0: http://fcitx.googlecode.com/files/%name-%{version}_dict.tar.bz2 |
9 |
BuildRequires: cmake |
10 |
BuildRequires: gettext-devel |
11 |
BuildRequires: libx11-devel |
12 |
BuildRequires: libxft-devel |
13 |
BuildRequires: xpm-devel |
14 |
BuildRequires: libxext-devel |
15 |
BuildRequires: dbus-glib-devel |
16 |
BuildRequires: gtk+2-devel |
17 |
BuildRequires: gtk+3-devel |
18 |
BuildRequires: opencc-devel |
19 |
BuildRequires: wget |
20 |
BuildRequires: cairo-devel |
21 |
BuildRequires: pango-devel |
22 |
BuildRequires: intltool |
23 |
BuildRequires: chrpath |
24 |
BuildRequires: desktop-file-utils |
25 |
Requires: locales-zh |
26 |
|
27 |
%description |
28 |
%{name} is an X input method allowing people to enter simplified Chinese |
29 |
characters in X environment following XIM standard. |
30 |
|
31 |
%package devel |
32 |
Summary: fcitx development library |
33 |
Group: Development/C |
34 |
Requires: %{name} = %{version} |
35 |
|
36 |
%description devel |
37 |
fcitx development files. |
38 |
|
39 |
%package gtk |
40 |
Summary: fcitx gtk module |
41 |
Group: System/Internationalization |
42 |
Requires: %{name} = %{version} |
43 |
Requires(post): gtk+2.0 |
44 |
Requires(postun): gtk+2.0 |
45 |
|
46 |
%description gtk |
47 |
fcitx gtk module. |
48 |
|
49 |
%post gtk |
50 |
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules.%_lib |
51 |
|
52 |
%postun gtk |
53 |
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules.%_lib |
54 |
|
55 |
%package gtk3 |
56 |
Summary: fcitx gtk3 module |
57 |
Group: System/Internationalization |
58 |
Requires: %{name} = %{version} |
59 |
Requires(post): gtk+3.0 |
60 |
Requires(postun): gtk+3.0 |
61 |
|
62 |
%description gtk3 |
63 |
fcitx gtk module. |
64 |
|
65 |
%post gtk3 |
66 |
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache |
67 |
|
68 |
%postun gtk3 |
69 |
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache |
70 |
|
71 |
%prep |
72 |
%setup -q -n %name-%version |
73 |
|
74 |
%build |
75 |
%cmake -DENABLE_GTK2_IM_MODULE=ON -DENABLE_GTK3_IM_MODULE=ON -DCMAKE_SKIP_RPATH=OFF |
76 |
%make |
77 |
|
78 |
%install |
79 |
rm -rf %{buildroot} |
80 |
%makeinstall_std -C build |
81 |
|
82 |
chrpath -d %{buildroot}%{_libdir}/*.so |
83 |
desktop-file-install --dir %{buildroot}%{_datadir}/applications \ |
84 |
%{buildroot}%{_datadir}/applications/*.desktop |
85 |
|
86 |
%find_lang %name |
87 |
|
88 |
%clean |
89 |
rm -rf %{buildroot} |
90 |
|
91 |
%files -f %name.lang |
92 |
%defattr(-,root,root) |
93 |
%attr(0644,-,-) %doc doc/*.txt doc/*.htm |
94 |
%{_bindir}/* |
95 |
%{_libdir}/*.so.* |
96 |
%{_libdir}/%{name} |
97 |
%{_datadir}/%{name} |
98 |
%{_datadir}/mime/packages/*.xml |
99 |
%{_mandir}/man1/* |
100 |
%{_datadir}/applications/*.desktop |
101 |
%{_iconsdir}/*/*/*/* |
102 |
|
103 |
%files gtk |
104 |
%defattr(-,root,root) |
105 |
%{_libdir}/gtk-2.0/*/immodules/im-fcitx.so |
106 |
|
107 |
%files gtk3 |
108 |
%defattr(-,root,root) |
109 |
%{_libdir}/gtk-3.0/*/immodules/im-fcitx.so |
110 |
|
111 |
%files devel |
112 |
%defattr(-,root,root) |
113 |
%{_libdir}/*.so |
114 |
%{_libdir}/pkgconfig/*.pc |
115 |
%{_datadir}/cmake/%{name} |
116 |
%{_includedir}/* |