a46ad0d
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
b55fd8e
%{!?gtk_binary_version: %define gtk_binary_version %(pkg-config  --variable=gtk_binary_version gtk+-2.0)}
c379828
c379828
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
c379828
%define gconf2_version 2.12.0
9bbbce4
%define dbus_python_version 0.83.0
c379828
%define im_chooser_version 1.2.5
c379828
a46ad0d
Name:       ibus
f773b50
Version:    1.1.0.20090311
c379828
Release:    1%{?dist}
d816398
Summary:    Intelligent Input Bus for Linux OS
a46ad0d
License:    LGPLv2+
a46ad0d
Group:      System Environment/Libraries
a46ad0d
URL:        http://code.google.com/p/ibus/
a46ad0d
Source0:    http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
a46ad0d
Source1:    xinput-ibus
f01d539
Patch0:     ibus-HEAD.patch
a46ad0d
a46ad0d
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a46ad0d
f33bbfe
a46ad0d
BuildRequires:  gettext-devel
a46ad0d
BuildRequires:  libtool
a46ad0d
BuildRequires:  python
a46ad0d
BuildRequires:  gtk2-devel
a46ad0d
BuildRequires:  dbus-glib-devel
9bbbce4
BuildRequires:  dbus-python-devel >= %{dbus_python_version}
d3fa3ee
BuildRequires:  desktop-file-utils
1ec38f4
BuildRequires:  gtk-doc
1ec38f4
BuildRequires:  GConf2-devel
1ec38f4
BuildRequires:  pygobject2-devel
f01d539
# BuildRequires:  qt-devel
d3fa3ee
48fa194
Requires:   %{name}-libs = %{version}-%{release}
48fa194
a46ad0d
Requires:   pygtk2
5e8e563
Requires:   notification-daemon
5e8e563
Requires:   pyxdg
860840a
Requires:   iso-codes
9bbbce4
Requires:   dbus-python >= %{dbus_python_version}
c379828
Requires:   im-chooser >= %{im_chooser_version}
c379828
Requires:   GConf2 >= %{gconf2_version}
c379828
c379828
Requires(post):  desktop-file-utils
c379828
Requires(postun):  desktop-file-utils
c379828
c379828
Requires(pre): GConf2 >= %{gconf2_version}
c379828
Requires(post): GConf2 >= %{gconf2_version}
c379828
Requires(preun): GConf2 >= %{gconf2_version}
c379828
c379828
Requires(post):  %{_sbindir}/alternatives
c379828
Requires(postun):  %{_sbindir}/alternatives
a46ad0d
741d918
Obsoletes:  ibus-qt < 1.1.0
1ec38f4
1ec38f4
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf
1ec38f4
a46ad0d
%description
d816398
IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It provides
a46ad0d
full featured and user friendly input method user interface. It also may help
a46ad0d
developers to develop input method easily.
a46ad0d
48fa194
%package libs
48fa194
Summary:    IBus libraries
48fa194
Group:      System Environment/Libraries
48fa194
c379828
Requires:   glib2 >= %{glib_ver}
c379828
Requires:   dbus >= 1.2.4
c379828
48fa194
%description libs
48fa194
This package contains the libraries for IBus
48fa194
a46ad0d
%package gtk
d3fa3ee
Summary:    IBus im module for gtk2
a46ad0d
Group:      System Environment/Libraries
a46ad0d
Requires:   %{name} = %{version}-%{release}
bd758d2
Requires(post): glib2 >= %{glib_ver}
a46ad0d
a46ad0d
%description gtk
a46ad0d
This package contains ibus im module for gtk2
a46ad0d
1ec38f4
# %package qt
1ec38f4
# Summary:    IBus im module for qt4
1ec38f4
# Group:      System Environment/Libraries
1ec38f4
# Requires:   %{name} = %{version}-%{release}
1ec38f4
# Requires:   qt >= 4.4.2
1ec38f4
# 
1ec38f4
# %description qt
1ec38f4
# This package contains ibus im module for qt4
1ec38f4
1ec38f4
%package devel
1ec38f4
Summary:    Development tools for ibus
1ec38f4
Group:      Development/Libraries
a46ad0d
Requires:   %{name} = %{version}-%{release}
1ec38f4
Requires:   glib2-devel
1ec38f4
Requires:   dbus-devel
1ec38f4
Requires:   gtk-doc
a46ad0d
1ec38f4
%description devel
1ec38f4
The ibus-devel package contains the header files and developer
1ec38f4
docs for ibus.
a46ad0d
a46ad0d
%prep
a46ad0d
%setup -q
1711405
# %patch0 -p1
a46ad0d
a46ad0d
%build
1ec38f4
%configure --disable-static \
1ec38f4
		   --disable-iso-codes-check \
1ec38f4
		   --enable-gtk-doc \
1ec38f4
		   --disable-qt4-immodule
a46ad0d
# make -C po update-gmo
a46ad0d
make %{?_smp_mflags}
a46ad0d
a46ad0d
%install
a46ad0d
rm -rf $RPM_BUILD_ROOT
a46ad0d
make DESTDIR=${RPM_BUILD_ROOT} install
1ec38f4
rm -f $RPM_BUILD_ROOT%{_libdir}/libibus.la
b55fd8e
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.la
a46ad0d
a46ad0d
# install xinput config file
a46ad0d
mkdir -pm 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/X11/xinit/xinput.d
a46ad0d
install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf}
a46ad0d
d3fa3ee
# install .desktop files
1711405
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop
1711405
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop
1711405
echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
1711405
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
d3fa3ee
desktop-file-install --delete-original          \
d3fa3ee
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
d3fa3ee
  $RPM_BUILD_ROOT%{_datadir}/applications/*
d3fa3ee
86843fa
%find_lang %{name}
a46ad0d
a46ad0d
%clean
a46ad0d
rm -rf $RPM_BUILD_ROOT
a46ad0d
1711405
%post
d3fa3ee
update-desktop-database -q
3d68915
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
a46ad0d
c379828
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
c379828
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
1711405
c379828
%pre
c379828
if [ "$1" -gt 1 ]; then
c379828
	export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
c379828
	gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
c379828
fi
c379828
c379828
%preun
c379828
if [ "$1" -eq 0 ]; then
c379828
	export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
c379828
	gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
c379828
fi
a46ad0d
1711405
%postun
d3fa3ee
update-desktop-database -q
3d68915
if [ "$1" = "0" ]; then
d3fa3ee
  %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
d3fa3ee
  # if alternative was set to manual, reset to auto
d3fa3ee
  [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
3d68915
fi
a46ad0d
c379828
%post libs
c379828
/sbin/ldconfig
c379828
1711405
%postun libs
1711405
/sbin/ldconfig
1711405
c379828
%post gtk
c379828
%{_bindir}/update-gtk-immodules %{_host} || :
c379828
d3fa3ee
%postun gtk
d3fa3ee
%{_bindir}/update-gtk-immodules %{_host} || :
d3fa3ee
86843fa
%files -f %{name}.lang
a46ad0d
%defattr(-,root,root,-)
a46ad0d
%doc AUTHORS COPYING README
a46ad0d
%dir %{python_sitelib}/ibus
a46ad0d
%{python_sitelib}/ibus/*
a46ad0d
%dir %{_datadir}/ibus/
1ec38f4
%{_bindir}/ibus-daemon
a46ad0d
%{_bindir}/ibus-setup
1ec38f4
%{_datadir}/ibus/*
8a89c0e
%{_datadir}/applications/*
a46ad0d
%{_datadir}/pixmaps/*
1ec38f4
%{_libexecdir}/ibus-gconf
1ec38f4
%{_libexecdir}/ibus-ui-gtk
1ec38f4
%{_libexecdir}/ibus-x11
1711405
# %{_sysconfdir}/xdg/autostart/ibus.desktop
c379828
%{_sysconfdir}/gconf/schemas/ibus.schemas
a46ad0d
%config %{_xinputconf}
a46ad0d
48fa194
%files libs
48fa194
%defattr(-,root,root,-)
48fa194
%{_libdir}/libibus.so*
48fa194
a46ad0d
%files gtk
a46ad0d
%defattr(-,root,root,-)
b55fd8e
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so
a46ad0d
1ec38f4
# %files qt
1ec38f4
# %defattr(-,root,root,-)
1ec38f4
# %{_libdir}/qt4/plugins/inputmethods/libibus.so
1ec38f4
1ec38f4
%files devel
a46ad0d
%defattr(-,root,root,-)
1ec38f4
%{_libdir}/lib*.so
1ec38f4
%{_includedir}/*
1ec38f4
%{_datadir}/gtk-doc/html/*
1ec38f4
%{_libdir}/pkgconfig/*
a46ad0d
a46ad0d
%changelog
f773b50
* Wed Mar 11 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090311-1
f773b50
- Update to ibus-1.1.0.20090311.
f773b50
- Update setup ui follow GNOME Human Interface Guidelines 2.2 (#489497).
f773b50
c379828
* Fri Mar  6 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090306-1
c379828
- Update to ibus-1.1.0.20090306.
c379828
bd758d2
* Tue Mar  3 2009 Jens Petersen <petersen@redhat.com>
bd758d2
- use post for ibus-gtk requires glib2
bd758d2
741d918
* Mon Mar  2 2009 Jens Petersen <petersen@redhat.com> - 1.1.0.20090225-2
741d918
- drop the superfluous ibus-0.1 engine obsoletes
741d918
- move glib2 requires to gtk package
741d918
1711405
* Tue Feb 25 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090225-1
1711405
- Update to ibus-1.1.0.20090225.
1711405
- Fix problems in %post and %postun scripts.
1711405
- Hide ibus & ibus preferences menu items.
1711405
f1f13f7
* Tue Feb 17 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-10
f1f13f7
- Recreate the ibus-HEAD.patch from upstream git source tree.
f1f13f7
- Put 'Select an input method' in engine select combobox (#485861).
f1f13f7
bfd6ae7
* Tue Feb 17 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-9
bfd6ae7
- Add requires im-chooser >= 1.2.5.
bfd6ae7
13d9ada
* Tue Feb 17 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-8
f899d7f
- Recreate the ibus-HEAD.patch from upstream git source tree.
13d9ada
- Fix ibus-hangul segfault (#485438).
f899d7f
7cae023
* Mon Feb 16 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-6
7cae023
- Recreate the ibus-HEAD.patch from upstream git source tree.
7cae023
- The new patch fixes ibus-x11 segfault (#485661).
7cae023
8b3cdeb
* Sun Feb 15 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-5
8b3cdeb
- Recreate the ibus-HEAD.patch from upstream git source tree.
8b3cdeb
79bc7e2
* Sun Feb 15 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-4
79bc7e2
- Remove gnome-python2-gconf from requires.
79bc7e2
0de710e
* Fri Feb 13 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-3
0de710e
- Update ibus-HEAD.patch, to fix bug 484652.
0de710e
f01d539
* Fri Feb 13 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-2
f01d539
- Add patch ibus-HEAD.patch, to update ibus to HEAD version.
f01d539
96ce3a9
* Wed Feb 11 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090211-1
48fa194
- Add --xim argument in xinput-ibus
48fa194
- Add Obsoletes:  ibus-qt <= 1.1.0
48fa194
- Move libibus.so.* to ibus-libs to make ibus multilib.
96ce3a9
- Update to 1.1.0.20090211.
48fa194
1ec38f4
* Thu Feb 05 2009 Huang Peng <shawn.p.huang@gmail.com> - 1.1.0.20090205-1
1ec38f4
- Update to 1.1.0.20090205.
1ec38f4
f33bbfe
* Tue Feb 03 2009 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20090203-1
f33bbfe
- Update to 0.1.1.20090203.
f33bbfe
6f04ad2
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1.1.20081023-3
6f04ad2
- Rebuild for Python 2.6
6f04ad2
b1c01a1
* Wed Nov 19 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081023-2
b1c01a1
- Move libibus-gtk.so from ibus.rpm to ibus-gtk.rpm to fix bug 472146.
b1c01a1
490d980
* Thu Oct 23 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081023-1
490d980
- Update to 0.1.1.20081023.
490d980
56f3325
* Thu Oct 16 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081016-1
56f3325
- Update to 0.1.1.20081016.
56f3325
1707a40
* Tue Oct  7 2008 Jens Petersen <petersen@redhat.com> - 0.1.1.20081006-3
1707a40
- remove the empty %%doc file entries
1707a40
3d68915
* Tue Oct  7 2008 Jens Petersen <petersen@redhat.com> - 0.1.1.20081006-2
3d68915
- add xinputrc alternative when installing or uninstalling
3d68915
3ceca47
* Mon Oct 06 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081006-1
3ceca47
- Update to 0.1.1.20081006.
3ceca47
f086536
* Sun Oct 05 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081005-1
f086536
- Update to 0.1.1.20081005.
f086536
3cfb2db
* Sat Oct 04 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081004-1
3cfb2db
- Update to 0.1.1.20081004.
3cfb2db
ad17161
* Wed Oct 01 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081001-1
ad17161
- Update to 0.1.1.20081001.
ad17161
b55fd8e
* Tue Sep 30 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080930-1
b55fd8e
- Update to 0.1.1.20080930.
b55fd8e
c08d658
* Tue Sep 23 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080923-1
c08d658
- Update to 0.1.1.20080923.
c08d658
33b9829
* Wed Sep 17 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080917-1
33b9829
- Update to 0.1.1.20080917.
33b9829
2e7d1b0
* Tue Sep 16 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080916-1
2e7d1b0
- Update to 0.1.1.20080916.
2e7d1b0
454ce80
* Mon Sep 15 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080914-1
454ce80
- Update to 0.1.1.20080914.
454ce80
d816398
* Mon Sep 08 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080908-1
d816398
- Update to 0.1.1.20080908.
d816398
bf0939a
* Mon Sep 01 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080901-1
bf0939a
- Update to 0.1.1.20080901.
bf0939a
f6c0679
* Sat Aug 30 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080830-1
f6c0679
- Update to 0.1.1.20080830.
f6c0679
26a9947
* Mon Aug 25 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080825-1
26a9947
- Update to 0.1.1.20080825.
26a9947
40afea4
* Sat Aug 23 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080823-1
40afea4
- Update to 0.1.1.20080823.
40afea4
86843fa
* Fri Aug 15 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080815-1
86843fa
- Update to 0.1.1.20080815.
86843fa
58ac710
* Thu Aug 12 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20080812-1
58ac710
- Update to 0.1.1.20080812.
58ac710
0815c8e
* Mon Aug 11 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.0.20080810-2
0815c8e
- Add gnome-python2-gconf in Requires.
0815c8e
a46ad0d
* Thu Aug 07 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.0.20080810-1
a46ad0d
- The first version.