# # spec file for package ibus # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define with_automatic_config 1 Name: ibus Version: 1.5.4 Release: 0 Url: http://code.google.com/p/ibus/ Summary: Intelligent Input Bus for Linux OS License: LGPL-2.1+ Group: System/I18n/Chinese Source: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source2: ibus-README.suse Source3: xim.ibus.suse.template Source4: xim.d-ibus-121 Source5: kde.tar.gz Source6: kde-12.2.tar.gz %if %{with_automatic_config} Patch0: ibus-python-install-dir.patch # PATCH-FEATURE-UPSTREAM add-libgnomekbd-and-load-preload-engines.patch Issue 1641 ftake@geeko.jp Patch1: add-libgnomekbd-and-load-preload-engines.patch # PATCH-FEATURE-UPSTREAM reload-preload-engines-until-users-customize-the-list.patch Issue 1641 ftake@geeko.jp Patch2: reload-preload-engines-until-users-customize-the-list.patch %endif # PATCH-FIX-OPENSUSE reload-preload-engines-until-users-customize-the-list.patch ftake@geeko.jp Patch3: show-input-mode-icon.patch # PATCH-FIX-UPSTREAM Always-save-the-content-type-cache-for-gnome-shell-p.patch bnc#847718 Patch4: Always-save-the-content-type-cache-for-gnome-shell-p.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /usr/bin/touch Provides: locale(ja;ko;zh) BuildRequires: dbus-1-glib-devel BuildRequires: dbus-1-python-devel >= 0.83.0 %if %{with_automatic_config} BuildRequires: dbus-1-x11 %endif BuildRequires: dconf-devel >= 0.7.5 BuildRequires: fdupes BuildRequires: gconf2-devel BuildRequires: gettext-devel BuildRequires: glib2-devel >= 2.26.0 BuildRequires: gobject-introspection-devel >= 0.9.6 BuildRequires: gtk-doc >= 1.9 BuildRequires: gtk2-devel BuildRequires: intltool BuildRequires: iso-codes-devel %if %{with_automatic_config} BuildRequires: libgnomekbd-devel %endif BuildRequires: libnotify-devel >= 0.7 BuildRequires: libtool # directory ownership { BuildRequires: oxygen-icon-theme BuildRequires: oxygen-icon-theme-scalable # } BuildRequires: pkg-config BuildRequires: python >= 2.5 BuildRequires: python-gobject2-devel BuildRequires: update-desktop-files BuildRequires: pkgconfig(vapigen) >= 0.16 Requires: dbus-1-python Requires: dconf Requires: gobject-introspection Requires: iso-codes Requires: libibus-1_0-5 = %{version} Requires: notification-daemon Requires: python-gobject Requires: python-gtk Requires: python-notify %if 0%{suse_version} >= 1220 Requires: typelib-1_0-Gtk-2_0 Requires: typelib-1_0-Gtk-3_0 %endif Obsoletes: ibus-gnome-shell Obsoletes: libibus-1_0-0 Recommends: %{name}-lang #Fix cursor following problem in KDE4 for libreoffice, libreoffice-kde and libreoffice-kde4 can destroy cursor following, please don't install them with ibus. Supplements: packageand(libreoffice:libreoffice-gnome) Conflicts: libreoffice-kde Conflicts: libreoffice-kde4 %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define gtk_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0) %description IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It provides full featured and user friendly input method user interface. It also may help developers to develop input method easily. %package -n libibus-1_0-5 Summary: IBus libraries Group: System/I18n/Chinese %description -n libibus-1_0-5 This package contains the libraries for IBus %package -n typelib-1_0-IBus-1_0 Summary: IBus libraries -- Introspection bindings Group: System/I18n/Chinese %description -n typelib-1_0-IBus-1_0 This package contains the introspection bindings for the IBus library. %package gtk Summary: IBus im module for gtk2 Group: System/I18n/Chinese Requires: %{name} = %{version} %gtk2_immodule_requires Supplements: packageand(ibus:gtk2) %description gtk This package contains ibus im module for gtk2 %package gtk3 Summary: IBus im module for gtk3 Group: System/I18n/Chinese Requires: %{name} = %{version} BuildRequires: gtk3-devel %gtk3_immodule_requires Supplements: packageand(ibus:gtk3) %description gtk3 This package contains ibus im module for gtk3 %package -n python-ibus Summary: Python module for ibus Group: System/I18n/Chinese Requires: %{name} = %{version} %description -n python-ibus This package contains python module for ibus %package branding-openSUSE-KDE Summary: openSUSE branding for KDE Group: System/GUI/KDE Requires: ibus = %{version} Supplements: packageand(ibus:kdelibs4) Supplements: packageand(ibus:branding-openSUSE-KDE) Provides: ibus-branding = %{version} Conflicts: otherproviders(ibus-branding) %if 0%{?suse_version} >= 1140 BuildArch: noarch %endif %description branding-openSUSE-KDE openSUSE branding for KDE monochrome icons in systray. %package devel Summary: Development tools for ibus Group: Development/Libraries/Other Requires: dbus-1-devel Requires: glib2-devel Requires: gtk-doc Requires: ibus = %{version} Requires: libibus-1_0-5 = %{version} Requires: typelib-1_0-IBus-1_0 = %{version} %description devel The ibus-devel package contains the header files and developer docs for ibus. %lang_package %prep %setup -q %patch0 -p1 %if %{with_automatic_config} %patch1 -p1 %patch2 -p1 rm -f bindings/vala/ibus-1.0.vapi rm -f data/dconf/00-upstream-settings %endif %patch3 -p1 %patch4 -p1 %build autoreconf -fi intltoolize -f %configure --disable-static \ --enable-gtk3 \ --enable-vala \ --enable-python-library \ --enable-introspection \ --disable-gconf \ --enable-dconf \ --enable-gtk-doc \ %if %{with_automatic_config} --enable-libgnomekbd \ %endif --enable-surrounding-text \ --libexecdir=%{_prefix}/%{_lib}/ibus %if %{with_automatic_config} make -C ui/gtk3 maintainer-clean-generic %endif make %{?jobs:-j %jobs} %install %makeinstall # autostart mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/ install -m 644 $RPM_SOURCE_DIR/xim.d-ibus-121 $RPM_BUILD_ROOT/etc/X11/xim.d/ibus sed -i 1i"SYS_LIB=%{_lib}" $RPM_BUILD_ROOT/etc/X11/xim.d/ibus PRIORITY=40 pushd $RPM_BUILD_ROOT/etc/X11/xim.d/ for lang in am ar as bn el fa gu he hi hr ja ka kk kn ko lo ml my \ pa ru sk vi zh_TW zh_CN zh_HK zh_SG \ de fr it es nl cs pl da nn nb fi en sv do mkdir $lang pushd $lang ln -s ../ibus $PRIORITY-ibus popd done popd # remove static libs rm -f $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.*a rm -f $RPM_BUILD_ROOT/%{_libdir}/libibus-*.*a mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps ln -sf %{_datadir}/icons/hicolor/48x48/apps/ibus-keyboard.png \ $RPM_BUILD_ROOT%{_datadir}/pixmaps/ibus-keyboard.png # touch for %%ghost touch $RPM_BUILD_ROOT/%{_sysconfdir}/dconf/db/ibus # fix kde monochrome icons %if 0%{?suse_version} >= 1230 cp -r %{SOURCE5} ./ %else cp -r %{SOURCE6} ./ mv kde-12.2.tar.gz kde.tar.gz %endif tar -xzf kde.tar.gz pushd kde for i in 16 22 24 32 48 ; do mkdir -p %{buildroot}%{_datadir}/icons/oxygen/${i}x${i}/apps/ cp -r ibus-keyboard.${i}x${i}.png %{buildroot}%{_datadir}/icons/oxygen/${i}x${i}/apps/ibus-keyboard.png done mkdir -p %{buildroot}%{_datadir}/icons/oxygen/scalable/apps/ cp -r ibus-keyboard.svgz %{buildroot}%{_datadir}/icons/oxygen/scalable/apps/ popd %suse_update_desktop_file %name-setup System Utility settings %fdupes %buildroot/%_prefix %fdupes -s $RPM_BUILD_ROOT %find_lang ibus10 %{?no_lang_C} %post %glib2_gsettings_schema_post %posttrans dconf update %postun %glib2_gsettings_schema_postun dconf update %post gtk %gtk2_immodule_post %postun gtk %gtk2_immodule_postun %post -n libibus-1_0-5 -p /sbin/ldconfig %postun -n libibus-1_0-5 -p /sbin/ldconfig %post gtk3 %gtk3_immodule_post %postun gtk3 %gtk3_immodule_postun %files %defattr(-,root,root,-) %doc AUTHORS COPYING README %doc $RPM_SOURCE_DIR/xim.ibus.suse.template %doc $RPM_SOURCE_DIR/ibus-README.suse %dir /etc/X11/xim.d %config /etc/X11/xim.d/* %dir %{_datadir}/ibus/ %{_bindir}/ibus %{_bindir}/ibus-daemon %{_bindir}/ibus-setup %{_datadir}/ibus/* %{_datadir}/applications/* %dir %{_datadir}/GConf %dir %{_datadir}/GConf/gsettings %{_datadir}/GConf/gsettings/ibus.convert %{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/pixmaps/* %{_prefix}/%{_lib}/ibus %{_datadir}/bash-completion %dir %config %{_sysconfdir}/dconf/db/ibus.d # These files are not config files. Users must not modify them. %{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings %ghost %{_sysconfdir}/dconf/db/ibus %{_sysconfdir}/dconf/profile/ibus %{_mandir}/man1/ibus* %files lang -f ibus10.lang %files -n libibus-1_0-5 %defattr(-,root,root,-) %{_libdir}/lib*.so.* %files -n typelib-1_0-IBus-1_0 %defattr(-,root,root,-) %{_libdir}/girepository-1.0/IBus-1.0.typelib %files gtk %defattr(-,root,root,-) %{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so %files gtk3 %defattr(-,root,root,-) %{_libdir}/gtk-3.0/3.0.0/immodules/* %files -n python-ibus %defattr(-,root,root,-) %{_libdir}/python2.7/site-packages/ibus %files devel %defattr(-,root,root,-) %{_libdir}/lib*.so %{_includedir}/* %{_datadir}/gtk-doc/html/* %{_libdir}/pkgconfig/* %{_datadir}/gir-1.0/IBus-1.0.gir %{_datadir}/vala/vapi/* %files branding-openSUSE-KDE %defattr(-,root,root,-) %dir %{_datadir}/icons/oxygen/24x24 %dir %{_datadir}/icons/oxygen/24x24/apps %{_datadir}/icons/oxygen/*/apps/ibus-keyboard.* %changelog