1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
1 |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
2 |
%{!?gtk_binary_version: %define gtk_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)} |
|
3 |
%define mod_path ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@ |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
4 |
%define host_vendor %(if [[ "%{_host_vendor}" == "unknown" ]]; then echo redhat; else echo %{_host_vendor}; fi) |
5 |
%define host %{_host_cpu}-%{host_vendor}-%{_host_os}-gnu |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
6 |
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999") |
7 |
%define gconf2_version 2.12.0 |
|
8 |
%define dbus_python_version 0.83.0 |
|
9 |
%define im_chooser_version 1.2.5 |
|
10 |
||
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
11 |
Name: ibus |
12 |
Version: @PACKAGE_VERSION@ |
|
13 |
Release: 1%{?dist} |
|
14 |
Summary: Intelligent Input Bus for Linux OS |
|
15 |
License: LGPLv2+ |
|
16 |
Group: System Environment/Libraries |
|
17 |
URL: http://code.google.com/p/ibus/ |
|
18 |
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz |
|
19 |
Source1: xinput-ibus |
|
20 |
||
21 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|
22 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
23 |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
24 |
BuildRequires: cvs |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
25 |
BuildRequires: gettext-devel |
26 |
BuildRequires: libtool |
|
27 |
BuildRequires: python |
|
28 |
BuildRequires: gtk2-devel |
|
29 |
BuildRequires: dbus-glib-devel |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
30 |
BuildRequires: dbus-python-devel >= %{dbus_python_version} |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
31 |
BuildRequires: desktop-file-utils |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
32 |
BuildRequires: gtk-doc |
33 |
BuildRequires: GConf2-devel |
|
34 |
BuildRequires: pygobject2-devel |
|
35 |
BuildRequires: intltool |
|
36 |
# BuildRequires: qt-devel
|
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
37 |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
38 |
Requires: %{name}-libs = %{version}-%{release} |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
39 |
Requires: %{name}-gtk = %{version}-%{release} |
40 |
||
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
41 |
Requires: pygtk2 |
42 |
Requires: pyxdg |
|
43 |
Requires: iso-codes |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
44 |
Requires: dbus-python >= %{dbus_python_version} |
45 |
Requires: im-chooser >= %{im_chooser_version} |
|
46 |
Requires: GConf2 >= %{gconf2_version} |
|
47 |
||
48 |
Requires(post): desktop-file-utils |
|
49 |
Requires(postun): desktop-file-utils |
|
50 |
||
51 |
Requires(pre): GConf2 >= %{gconf2_version} |
|
52 |
Requires(post): GConf2 >= %{gconf2_version} |
|
53 |
Requires(preun): GConf2 >= %{gconf2_version} |
|
54 |
||
55 |
Requires(post): %{_sbindir}/alternatives |
|
56 |
Requires(postun): %{_sbindir}/alternatives |
|
57 |
||
58 |
Obsoletes: ibus-qt < 1.1.0 |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
59 |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
60 |
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf |
61 |
||
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
62 |
%description |
63 |
IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It provides |
|
64 |
full featured and user friendly input method user interface. It also may help |
|
65 |
developers to develop input method easily. |
|
66 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
67 |
%package libs |
68 |
Summary: IBus libraries |
|
69 |
Group: System Environment/Libraries |
|
70 |
||
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
71 |
Requires: glib2 >= %{glib_ver} |
72 |
Requires: dbus >= 1.2.4 |
|
73 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
74 |
%description libs |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
75 |
This package contains the libraries for IBus |
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
76 |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
77 |
%package gtk |
78 |
Summary: IBus im module for gtk2 |
|
79 |
Group: System Environment/Libraries |
|
80 |
Requires: %{name} = %{version}-%{release} |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
81 |
Requires(post): glib2 >= %{glib_ver} |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
82 |
|
83 |
%description gtk |
|
84 |
This package contains ibus im module for gtk2 |
|
85 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
86 |
# %package qt
|
87 |
# Summary: IBus im module for qt4
|
|
88 |
# Group: System Environment/Libraries
|
|
89 |
# Requires: %{name} = %{version}-%{release}
|
|
90 |
# Requires: qt >= 4.4.2
|
|
1.2.4
by LI Daobing
Import upstream version 1.2.0.20090719 |
91 |
#
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
92 |
# %description qt
|
93 |
# This package contains ibus im module for qt4
|
|
94 |
||
95 |
%package devel |
|
96 |
Summary: Development tools for ibus |
|
97 |
Group: Development/Libraries |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
98 |
Requires: %{name} = %{version}-%{release} |
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
99 |
Requires: glib2-devel |
100 |
Requires: dbus-devel |
|
101 |
||
102 |
%description devel |
|
1.2.6
by LI Daobing
Import upstream version 1.2.0.20090806 |
103 |
The ibus-devel package contains the header files for ibus. |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
104 |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
105 |
%package devel-docs |
106 |
Summary: Developer documents for ibus |
|
107 |
Group: Development/Libraries |
|
108 |
Requires: %{name} = %{version}-%{release} |
|
109 |
Requires: gtk-doc |
|
110 |
||
111 |
%description devel-docs |
|
112 |
The ibus-devel-docs package contains developer documentation for ibus |
|
113 |
||
114 |
||
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
115 |
%prep |
116 |
%setup -q |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
117 |
# %patch0 -p1
|
118 |
# ./autogen.sh --help
|
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
119 |
|
120 |
%build |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
121 |
%configure --disable-static \ |
122 |
--disable-iso-codes-check \ |
|
123 |
--enable-gtk-doc \ |
|
124 |
--disable-qt4-immodule |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
125 |
# make -C po update-gmo
|
126 |
make %{?_smp_mflags} |
|
127 |
||
128 |
%install |
|
129 |
rm -rf $RPM_BUILD_ROOT |
|
130 |
make DESTDIR=${RPM_BUILD_ROOT} install |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
131 |
rm -f $RPM_BUILD_ROOT%{_libdir}/libibus.la |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
132 |
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.la |
133 |
||
134 |
# install xinput config file
|
|
135 |
mkdir -pm 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/X11/xinit/xinput.d |
|
136 |
install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf} |
|
137 |
||
138 |
# install .desktop files
|
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
139 |
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop |
140 |
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop |
|
141 |
echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop |
|
142 |
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
143 |
desktop-file-install --delete-original \ |
144 |
--dir $RPM_BUILD_ROOT%{_datadir}/applications \ |
|
145 |
$RPM_BUILD_ROOT%{_datadir}/applications/* |
|
146 |
||
147 |
%find_lang %{name} |
|
148 |
||
149 |
%clean |
|
150 |
rm -rf $RPM_BUILD_ROOT |
|
151 |
||
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
152 |
%post |
1.2.10
by LI Daobing
Import upstream version 1.2.0.20090904 |
153 |
# recreate icon cache
|
154 |
touch --no-create %{_datadir}/icons/hicolor || : |
|
155 |
[ -x %{_bindir}/gtk-update-icon-cache ] && \ |
|
156 |
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : |
|
157 |
||
158 |
update-desktop-database -q || : |
|
159 |
||
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
160 |
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || : |
161 |
||
162 |
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` |
|
163 |
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || : |
|
164 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
165 |
%pre |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
166 |
if [ "$1" -gt 1 ]; then |
167 |
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` |
|
168 |
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || : |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
169 |
fi
|
170 |
||
171 |
%preun |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
172 |
if [ "$1" -eq 0 ]; then |
173 |
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` |
|
174 |
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || : |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
175 |
fi
|
176 |
||
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
177 |
%postun |
1.2.10
by LI Daobing
Import upstream version 1.2.0.20090904 |
178 |
# recreate icon cache
|
179 |
touch --no-create %{_datadir}/icons/hicolor || : |
|
180 |
[ -x %{_bindir}/gtk-update-icon-cache ] && \ |
|
181 |
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : |
|
182 |
||
183 |
update-desktop-database -q || : |
|
184 |
||
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
185 |
if [ "$1" = "0" ]; then |
186 |
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || : |
|
187 |
# if alternative was set to manual, reset to auto
|
|
188 |
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || : |
|
189 |
fi
|
|
190 |
||
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
191 |
%post libs |
192 |
/sbin/ldconfig |
|
193 |
||
194 |
%postun libs |
|
195 |
/sbin/ldconfig |
|
196 |
||
197 |
%post gtk |
|
1.2.4
by LI Daobing
Import upstream version 1.2.0.20090719 |
198 |
%{_bindir}/update-gtk-immodules %{host} || : |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
199 |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
200 |
%postun gtk |
1.2.4
by LI Daobing
Import upstream version 1.2.0.20090719 |
201 |
%{_bindir}/update-gtk-immodules %{host} || : |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
202 |
|
203 |
%files -f %{name}.lang |
|
204 |
%defattr(-,root,root,-) |
|
205 |
%doc AUTHORS COPYING README |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
206 |
%dir %{python_sitelib}/ibus |
207 |
%{python_sitelib}/ibus/* |
|
208 |
%dir %{_datadir}/ibus/ |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
209 |
%{_bindir}/ibus-daemon |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
210 |
%{_bindir}/ibus-setup |
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
211 |
%{_datadir}/ibus/* |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
212 |
%{_datadir}/applications/* |
213 |
%{_datadir}/pixmaps/* |
|
1.2.10
by LI Daobing
Import upstream version 1.2.0.20090904 |
214 |
%{_datadir}/icons/hicolor/*/status/* |
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
215 |
%{_libexecdir}/ibus-gconf |
216 |
%{_libexecdir}/ibus-ui-gtk |
|
217 |
%{_libexecdir}/ibus-x11 |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
218 |
# %{_sysconfdir}/xdg/autostart/ibus.desktop
|
219 |
%{_sysconfdir}/gconf/schemas/ibus.schemas |
|
220 |
%config %{_xinputconf} |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
221 |
|
222 |
%files libs |
|
223 |
%defattr(-,root,root,-) |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
224 |
%{_libdir}/libibus.so.* |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
225 |
|
226 |
%files gtk |
|
227 |
%defattr(-,root,root,-) |
|
228 |
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so |
|
229 |
||
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
230 |
# %files qt
|
231 |
# %defattr(-,root,root,-)
|
|
232 |
# %{_libdir}/qt4/plugins/inputmethods/libibus.so
|
|
233 |
||
234 |
%files devel |
|
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
235 |
%defattr(-,root,root,-) |
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
236 |
%{_libdir}/lib*.so |
237 |
%{_includedir}/* |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
238 |
%{_libdir}/pkgconfig/* |
239 |
||
240 |
%files devel-docs |
|
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
241 |
%{_datadir}/gtk-doc/html/* |
1
by Zhengpeng Hou
Import upstream version 0.1.1.20081023 |
242 |
|
243 |
%changelog |
|
1.2.3
by LI Daobing
Import upstream version 1.2.0.20090617 |
244 |
* @DATE_DISPLAY@ Peng Huang <shawn.p.huang@gmail.com> - @VERSION@-1 |
1.2.1
by LI Daobing
Import upstream version 1.1.0.20090417 |
245 |
- Current version. |