3
3
%define mod_path ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@
4
4
%define host_vendor %(if [[ "%{_host_vendor}" == "unknown" ]]; then echo redhat; else echo %{_host_vendor}; fi)
5
5
%define host %{_host_cpu}-%{host_vendor}-%{_host_os}-gnu
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
7
12
Version: @PACKAGE_VERSION@
16
21
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
20
25
BuildRequires: gettext-devel
21
26
BuildRequires: libtool
22
27
BuildRequires: python
23
28
BuildRequires: gtk2-devel
24
BuildRequires: dbus-devel
25
# BuildRequires: qt-devel
26
29
BuildRequires: dbus-glib-devel
27
BuildRequires: dbus-python-devel
30
BuildRequires: dbus-python-devel >= %{dbus_python_version}
28
31
BuildRequires: desktop-file-utils
29
BuildRequires: GConf2-devel
31
Requires(post): desktop-file-utils
32
Requires(post): %{_sbindir}/alternatives
33
Requires(postun): desktop-file-utils
34
Requires(postun): %{_sbindir}/alternatives
32
BuildRequires: gtk-doc
33
BuildRequires: GConf2-devel
34
BuildRequires: pygobject2-devel
35
BuildRequires: intltool
36
# BuildRequires: qt-devel
36
38
Requires: %{name}-libs = %{version}-%{release}
37
Requires: glib2 >= %{glib_ver}
39
Requires: %{name}-gtk = %{version}-%{release}
39
Requires: dbus-python >= 0.83.0
40
Requires: notification-daemon
42
43
Requires: iso-codes
44
Requires: dbus-python >= %{dbus_python_version}
45
Requires: im-chooser >= %{im_chooser_version}
46
Requires: GConf2 >= %{gconf2_version}
48
Requires(post): desktop-file-utils
49
Requires(postun): desktop-file-utils
51
Requires(pre): GConf2 >= %{gconf2_version}
52
Requires(post): GConf2 >= %{gconf2_version}
53
Requires(preun): GConf2 >= %{gconf2_version}
55
Requires(post): %{_sbindir}/alternatives
56
Requires(postun): %{_sbindir}/alternatives
58
Obsoletes: ibus-qt < 1.1.0
44
60
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf
52
68
Summary: IBus libraries
53
69
Group: System Environment/Libraries
71
Requires: glib2 >= %{glib_ver}
72
Requires: dbus >= 1.2.4
56
This package contains ibus libraries.
75
This package contains the libraries for IBus
60
78
Summary: IBus im module for gtk2
61
79
Group: System Environment/Libraries
62
80
Requires: %{name} = %{version}-%{release}
81
Requires(post): glib2 >= %{glib_ver}
65
84
This package contains ibus im module for gtk2
84
103
The ibus-devel package contains the header files and developer
107
Summary: Developer documents for ibus
108
Group: Development/Libraries
109
Requires: %{name} = %{version}-%{release}
112
%description devel-docs
113
The ibus-devel-docs package contains developer documentation for ibus
119
# ./autogen.sh --help
91
%configure --disable-static --disable-iso-codes-check
122
%configure --disable-static \
123
--disable-iso-codes-check \
125
--disable-qt4-immodule
92
126
# make -C po update-gmo
93
127
make %{?_smp_mflags}
103
137
install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf}
105
139
# install .desktop files
140
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop
141
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop
142
echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
143
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
106
144
desktop-file-install --delete-original \
107
145
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
108
146
$RPM_BUILD_ROOT%{_datadir}/applications/*
113
151
rm -rf $RPM_BUILD_ROOT
154
update-desktop-database -q
155
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
157
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
158
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
116
if [ "$1" -gt 1 ] ; then
117
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
118
gconftool-2 --makefile-uninstall-rule \
119
%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
161
if [ "$1" -gt 1 ]; then
162
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
163
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
123
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
124
gconftool-2 --makefile-install-rule \
125
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
128
if [ "$1" -eq 0 ] ; then
129
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
130
gconftool-2 --makefile-uninstall-rule \
131
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
167
if [ "$1" -eq 0 ]; then
168
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
169
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
136
update-desktop-database -q
137
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
140
%{_bindir}/update-gtk-immodules %{host} || :
144
173
update-desktop-database -q
145
174
if [ "$1" = "0" ]; then
146
175
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
148
177
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
187
%{_bindir}/update-gtk-immodules %{host} || :
152
190
%{_bindir}/update-gtk-immodules %{host} || :
154
192
%files -f %{name}.lang
155
193
%defattr(-,root,root,-)
156
194
%doc AUTHORS COPYING README
157
%{python_sitelib}/ibus
195
%dir %{python_sitelib}/ibus
196
%{python_sitelib}/ibus/*
197
%dir %{_datadir}/ibus/
158
198
%{_bindir}/ibus-daemon
159
199
%{_bindir}/ibus-setup
161
201
%{_datadir}/applications/*
162
202
%{_datadir}/pixmaps/*
163
203
%{_libexecdir}/ibus-gconf
164
204
%{_libexecdir}/ibus-ui-gtk
165
205
%{_libexecdir}/ibus-x11
166
%config(noreplace) %{_xinputconf}
167
%config(noreplace) %{_sysconfdir}/gconf/schemas/%{name}.schemas
168
%config(noreplace) %{_sysconfdir}/xdg/autostart/ibus.desktop
206
# %{_sysconfdir}/xdg/autostart/ibus.desktop
207
%{_sysconfdir}/gconf/schemas/ibus.schemas
208
%config %{_xinputconf}
171
211
%defattr(-,root,root,-)
172
%{_libdir}/libibus.so*
212
%{_libdir}/libibus.so.*
175
215
%defattr(-,root,root,-)
183
223
%defattr(-,root,root,-)
184
224
%{_libdir}/lib*.so
226
%{_libdir}/pkgconfig/*
186
229
%{_datadir}/gtk-doc/html/*
187
%{_libdir}/pkgconfig/*
190
* @DATE_DISPLAY@ Huang Peng <shawn.p.huang@gmail.com> - @VERSION@-1
232
* @DATE_DISPLAY@ Peng Huang <shawn.p.huang@gmail.com> - @VERSION@-1
191
233
- Current version.
193
* Thu Aug 07 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.0.20080810-1