%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?gtk2_binary_version: %define gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)}
%{!?gtk3_binary_version: %define gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)}
BuildRequires: desktop-file-utils
BuildRequires: gtk-doc
BuildRequires: GConf2-devel
+BuildRequires: dconf-devel
BuildRequires: pygobject2-devel
BuildRequires: intltool
BuildRequires: iso-codes-devel
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-gtk2 = %{version}-%{release}
Requires: %{name}-gtk3 = %{version}-%{release}
+Requires: %{name}-conf = %{version}-%{release}
Requires: pygtk2
Requires: pyxdg
Requires: iso-codes
Requires: dbus-python >= %{dbus_python_version}
Requires: im-chooser >= %{im_chooser_version}
-Requires: GConf2 >= %{gconf2_version}
Requires: notify-python
Requires: librsvg2
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
-Requires(pre): GConf2 >= %{gconf2_version}
-Requires(post): GConf2 >= %{gconf2_version}
-Requires(preun): GConf2 >= %{gconf2_version}
-
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
%description libs
This package contains the libraries for IBus
+%package gconf
+Summary: IBus configuration module using GConf
+Group: System Environment/Libraries
+Provides: %{name}-conf = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
+Requires: GConf2 >= %{gconf2_version}
+Requires(pre): GConf2 >= %{gconf2_version}
+Requires(post): GConf2 >= %{gconf2_version}
+Requires(preun): GConf2 >= %{gconf2_version}
+
+%description gconf
+This package contains ibus configuration module using GConf
+
+%package dconf
+Summary: IBus configuration module using DConf
+Group: System Environment/Libraries
+Provides: %{name}-conf = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
+Requires(posttrans): dconf
+
+%description dconf
+This package contains ibus configuration module using DConf
+
%package gtk2
Summary: IBus im module for gtk2
Group: System Environment/Libraries
%build
-OPTIONS="--disable-static --enable-gtk2 --enable-gtk3 --enable-xim --disable-gtk-doc --enable-introspection"
+OPTIONS="--disable-static --enable-gtk2 --enable-gtk3 --enable-xim --disable-gtk-doc --enable-introspection --enable-gconf"
%if %{build_python_library}
OPTIONS="$OPTIONS --enable-python-library"
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
+%post gconf
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
-%pre
+%pre gconf
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
fi
-%preun
+%preun gconf
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
fi
+%postun dconf
+if [ "$1" -eq 0 ] ; then
+ /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+ rm -f %{_sysconfdir}/dconf/db/ibus
+fi
+
+%posttrans dconf
+/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+dconf update &> /dev/null || :
+
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%{python_sitelib}/ibus/*
%endif
+%{python_sitearch}/gi/overrides/IBus.py*
+
%dir %{_datadir}/ibus/
%{_bindir}/ibus
%{_bindir}/ibus-daemon
%{_datadir}/ibus/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*
-%{_libexecdir}/ibus-gconf
%if %{build_python_library}
%{_libexecdir}/ibus-ui-gtk
%endif
%{_libexecdir}/ibus-x11
%{_libexecdir}/ibus-engine-simple
# %{_sysconfdir}/xdg/autostart/ibus.desktop
-%{_sysconfdir}/gconf/schemas/ibus.schemas
%{_sysconfdir}/bash_completion.d/ibus.bash
%config %{_xinputconf}
%{_libdir}/libibus-1.0.so.*
%{_libdir}/girepository-1.0/IBus-1.0.typelib
+%files gconf
+%defattr(-,root,root,-)
+%{_libexecdir}/ibus-gconf
+%{_sysconfdir}/gconf/schemas/ibus.schemas
+
+%files dconf
+%defattr(-,root,root,-)
+%{_libexecdir}/ibus-dconf
+%{_sysconfdir}/dconf/db/ibus.d
+%{_sysconfdir}/dconf/profile/ibus
+%{_datadir}/GConf/gsettings/ibus.convert
+%{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml
+
%files gtk2
%defattr(-,root,root,-)
%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.so