2010-03-26 18:05:03 +01:00
|
|
|
#
|
2011-03-14 10:36:14 +01:00
|
|
|
# spec file for package ibus
|
2010-03-26 18:05:03 +01:00
|
|
|
#
|
2013-01-10 16:27:06 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-03-26 18:05:03 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2011-08-09 10:54:38 +02:00
|
|
|
|
2011-08-08 17:14:02 +02:00
|
|
|
%define build_gtk3 (0%{suse_version} >= 1140)
|
2011-09-14 11:21:19 +02:00
|
|
|
%define build_without_dbus_autolaunch (0%{suse_version} >= 1210)
|
2011-10-12 11:32:18 +02:00
|
|
|
%define domain_name %{name}10
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
Name: ibus
|
2012-08-25 15:03:54 +02:00
|
|
|
Version: 1.4.2
|
2012-01-25 02:48:20 +01:00
|
|
|
Release: 0
|
2010-03-26 18:05:03 +01:00
|
|
|
Url: http://code.google.com/p/ibus/
|
2013-03-28 19:17:11 +01:00
|
|
|
Summary: Intelligent Input Bus for Linux OS
|
|
|
|
License: LGPL-2.1+
|
|
|
|
Group: System/I18n
|
|
|
|
|
|
|
|
Source: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
2010-03-26 18:05:03 +01:00
|
|
|
Source1: xim.d-ibus
|
|
|
|
Source2: ibus-README.suse
|
2011-09-14 11:21:19 +02:00
|
|
|
Source3: xim.ibus.suse.template
|
|
|
|
Source4: xim.d-ibus-121
|
2010-03-26 18:05:03 +01:00
|
|
|
Patch0: ibus-python-install-dir.patch
|
2012-02-15 15:57:56 +01:00
|
|
|
Patch1: ibus-fix-default-preload-engines.patch
|
2013-01-10 16:27:06 +01:00
|
|
|
# PATCH-FIX-OPENSUSE ibus-fix-docs-build-error.patch
|
|
|
|
Patch2: ibus-fix-docs-build-error.patch
|
2013-02-21 02:27:19 +01:00
|
|
|
# PATCH-FIX-OPENSUSE ibus-fix-tray-icon-on-gnome-3.6.patch
|
2013-02-09 06:44:27 +01:00
|
|
|
Patch3: ibus-fix-tray-icon-on-gnome-3.6.patch
|
2013-02-21 02:27:19 +01:00
|
|
|
# PATCH-FIX-OPENSUSE ibus_indicator-14.patch
|
|
|
|
Patch4: ibus_indicator-14.patch
|
2010-03-26 18:05:03 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
PreReq: /usr/bin/touch
|
2011-06-15 11:52:18 +02:00
|
|
|
Provides: locale(ja;ko;zh)
|
2012-03-07 13:50:27 +01:00
|
|
|
BuildRequires: dbus-1-glib-devel
|
2013-03-28 19:17:11 +01:00
|
|
|
BuildRequires: dbus-1-python-devel >= 0.83.0
|
2012-01-25 02:48:20 +01:00
|
|
|
BuildRequires: fdupes
|
2013-03-28 19:17:11 +01:00
|
|
|
BuildRequires: gconf2-devel >= 2.12
|
2012-01-25 02:48:20 +01:00
|
|
|
BuildRequires: gettext-devel
|
2013-03-28 19:17:11 +01:00
|
|
|
BuildRequires: glib2-devel >= 2.26.0
|
|
|
|
BuildRequires: gobject-introspection-devel >= 0.9.6
|
|
|
|
BuildRequires: gtk-doc >= 1.9
|
2012-01-25 02:48:20 +01:00
|
|
|
BuildRequires: gtk2-devel
|
|
|
|
BuildRequires: intltool
|
|
|
|
BuildRequires: iso-codes-devel
|
|
|
|
BuildRequires: libtool
|
2012-05-17 10:21:40 +02:00
|
|
|
BuildRequires: pkg-config
|
2013-03-28 19:17:11 +01:00
|
|
|
BuildRequires: python >= 2.5
|
2012-01-25 02:48:20 +01:00
|
|
|
BuildRequires: python-gobject2-devel
|
|
|
|
BuildRequires: update-desktop-files
|
2012-05-17 10:21:40 +02:00
|
|
|
Requires: dbus-1-python
|
|
|
|
Requires: gconf2
|
|
|
|
Requires: gobject-introspection
|
|
|
|
Requires: iso-codes
|
2012-06-18 11:01:01 +02:00
|
|
|
Requires: libibus-1_0-0 = %{version}
|
2012-05-17 10:21:40 +02:00
|
|
|
Requires: notification-daemon
|
|
|
|
Requires: python-gtk
|
|
|
|
Requires: python-notify
|
|
|
|
Requires: python-xdg
|
2010-03-26 18:05:03 +01:00
|
|
|
%gconf_schemas_prereq
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%package -n libibus-1_0-0
|
2010-03-26 18:05:03 +01:00
|
|
|
Summary: IBus libraries
|
2011-06-14 08:04:24 +02:00
|
|
|
Group: System/I18n/Chinese
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%description -n libibus-1_0-0
|
2010-03-26 18:05:03 +01:00
|
|
|
This package contains the libraries for IBus
|
|
|
|
|
2012-01-25 02:48:20 +01:00
|
|
|
%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.
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%package gtk
|
|
|
|
Summary: IBus im module for gtk2
|
2011-06-14 08:04:24 +02:00
|
|
|
Group: System/I18n/Chinese
|
2011-06-27 14:23:04 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-03-09 15:26:02 +01:00
|
|
|
%gtk2_immodule_requires
|
2011-06-15 11:52:18 +02:00
|
|
|
Supplements: packageand(ibus:gtk2)
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%description gtk
|
|
|
|
This package contains ibus im module for gtk2
|
|
|
|
|
2011-08-08 17:14:02 +02:00
|
|
|
%if %{build_gtk3}
|
2011-08-09 10:54:38 +02:00
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%package gtk3
|
2011-08-09 10:54:38 +02:00
|
|
|
|
2011-06-27 13:34:31 +02:00
|
|
|
Summary: IBus im module for gtk3
|
|
|
|
Group: System/I18n/Chinese
|
2011-06-27 14:23:04 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-06-27 13:34:31 +02:00
|
|
|
BuildRequires: gtk3-devel
|
2011-06-15 11:52:18 +02:00
|
|
|
%gtk3_immodule_requires
|
|
|
|
Supplements: packageand(ibus:gtk3)
|
2011-06-27 13:34:31 +02:00
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%description gtk3
|
|
|
|
This package contains ibus im module for gtk3
|
|
|
|
%endif
|
|
|
|
|
2013-03-28 19:17:11 +01:00
|
|
|
%package gnome-shell
|
|
|
|
# This implicitly draws in the GNOME Shell itself and thus is separate
|
|
|
|
Summary: GNOME Shell integration for IBus
|
|
|
|
Group: System/GUI/GNOME
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description gnome-shell
|
|
|
|
The package contains the files for integrating IBus into the GNOME
|
|
|
|
Shell.
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development tools for ibus
|
2011-10-12 11:32:18 +02:00
|
|
|
Group: Development/Libraries/Other
|
2010-03-26 18:05:03 +01:00
|
|
|
Requires: dbus-1-devel
|
2012-05-17 10:21:40 +02:00
|
|
|
Requires: glib2-devel
|
2010-03-26 18:05:03 +01:00
|
|
|
Requires: gtk-doc
|
2012-03-07 13:50:27 +01:00
|
|
|
Requires: ibus = %{version}
|
2012-05-17 10:21:40 +02:00
|
|
|
Requires: typelib-1_0-IBus-1_0 = %{version}
|
2012-03-07 13:50:27 +01:00
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%description devel
|
|
|
|
The ibus-devel package contains the header files and developer
|
|
|
|
docs for ibus.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
2012-02-15 15:57:56 +01:00
|
|
|
%patch1 -p1
|
2013-01-10 16:27:06 +01:00
|
|
|
%patch2 -p1
|
2013-02-09 06:44:27 +01:00
|
|
|
%if 0%{suse_version} >= 1230
|
|
|
|
%patch3 -p1
|
2013-02-21 02:27:19 +01:00
|
|
|
%patch4 -p1
|
2013-02-09 06:44:27 +01:00
|
|
|
%endif
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
|
|
|
intltoolize -f
|
|
|
|
%configure --disable-static \
|
2011-08-08 17:14:02 +02:00
|
|
|
%if %{build_gtk3}
|
2011-06-27 14:23:04 +02:00
|
|
|
--enable-gtk3 \
|
|
|
|
%endif
|
2010-03-26 18:05:03 +01:00
|
|
|
--disable-iso-codes-check \
|
2010-10-07 22:42:05 +02:00
|
|
|
--disable-gobject-introspection \
|
2010-03-26 18:05:03 +01:00
|
|
|
--enable-gtk-doc \
|
2011-06-27 14:23:04 +02:00
|
|
|
--libexecdir=%{_prefix}/%{_lib}/ibus
|
2012-10-17 08:23:24 +02:00
|
|
|
make %{?_smp_mflags}
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
%install
|
2013-03-28 19:17:11 +01:00
|
|
|
make install DESTDIR="%buildroot"
|
2011-09-14 11:21:19 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/X11/xim.d/
|
|
|
|
%if %{build_without_dbus_autolaunch}
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/xim.d-ibus-121 $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
|
|
|
|
%else
|
2010-03-26 18:05:03 +01:00
|
|
|
install -m 644 $RPM_SOURCE_DIR/xim.d-ibus $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
|
2011-09-14 11:21:19 +02:00
|
|
|
%endif
|
2010-03-26 18:05:03 +01:00
|
|
|
sed -i 1i"SYS_LIB=%{_lib}" $RPM_BUILD_ROOT/etc/X11/xim.d/ibus
|
|
|
|
|
2011-06-16 07:38:59 +02:00
|
|
|
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
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.*a
|
2011-10-12 11:32:18 +02:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libibus-*.*a
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
|
2012-05-17 10:21:40 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
2010-03-26 18:05:03 +01:00
|
|
|
ln -sf %{_datadir}/icons/hicolor/48x48/apps/ibus-keyboard.png \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/pixmaps/ibus-keyboard.png
|
|
|
|
|
|
|
|
%suse_update_desktop_file %name Utility DesktopUtility
|
2012-03-07 16:04:09 +01:00
|
|
|
%suse_update_desktop_file %name-setup System Utility settings
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%find_lang %{domain_name}
|
2010-03-26 18:05:03 +01:00
|
|
|
%find_gconf_schemas
|
2011-10-12 11:32:18 +02:00
|
|
|
cat %{name}.schemas_list %{domain_name}.lang > %{name}.lst
|
2013-03-28 19:17:11 +01:00
|
|
|
%fdupes %buildroot/%_prefix
|
2010-03-26 18:05:03 +01:00
|
|
|
%fdupes -s $RPM_BUILD_ROOT
|
|
|
|
|
2013-02-21 02:27:19 +01:00
|
|
|
%if 0%{suse_version} >= 1230
|
|
|
|
install -m755 -d %{buildroot}%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com
|
|
|
|
install -m644 ibus_indicator-14@ftake.github.com/* %{buildroot}%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com
|
|
|
|
%endif
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%pre -f %{name}.schemas_pre
|
|
|
|
|
|
|
|
%post gtk
|
2011-03-09 15:26:02 +01:00
|
|
|
%gtk2_immodule_post
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
%preun -f %{name}.schemas_preun
|
|
|
|
|
|
|
|
%posttrans -f %{name}.schemas_posttrans
|
|
|
|
|
|
|
|
%postun gtk
|
2011-03-09 15:26:02 +01:00
|
|
|
%gtk2_immodule_postun
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%post -n libibus-1_0-0 -p /sbin/ldconfig
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%postun -n libibus-1_0-0 -p /sbin/ldconfig
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-08-08 17:14:02 +02:00
|
|
|
%if %{build_gtk3}
|
2011-08-09 10:54:38 +02:00
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%post gtk3
|
|
|
|
%gtk3_immodule_post
|
2011-06-27 13:34:31 +02:00
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%postun gtk3
|
|
|
|
%gtk3_immodule_postun
|
|
|
|
%endif
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%files -f %{name}.lst
|
|
|
|
%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
|
2011-06-14 08:04:24 +02:00
|
|
|
%config /etc/X11/xim.d/*
|
2010-03-26 18:05:03 +01:00
|
|
|
%{python_sitelib}/ibus
|
|
|
|
%dir %{_datadir}/ibus/
|
|
|
|
%{_bindir}/ibus-daemon
|
|
|
|
%{_bindir}/ibus-setup
|
|
|
|
%{_datadir}/ibus/*
|
|
|
|
%{_datadir}/applications/*
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/*
|
|
|
|
%{_datadir}/pixmaps/*
|
|
|
|
%{_prefix}/%{_lib}/ibus
|
2013-03-28 19:17:11 +01:00
|
|
|
|
2013-02-21 02:27:19 +01:00
|
|
|
%if 0%{suse_version} >= 1230
|
2013-03-28 19:17:11 +01:00
|
|
|
%files gnome-shell
|
|
|
|
%defattr(-,root,root)
|
2013-02-21 02:27:19 +01:00
|
|
|
%dir %{_datadir}/gnome-shell/
|
|
|
|
%dir %{_datadir}/gnome-shell/extensions/
|
|
|
|
%dir %{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com/
|
|
|
|
%{_datadir}/gnome-shell/extensions/ibus_indicator-14@ftake.github.com/*
|
|
|
|
%endif
|
2010-03-26 18:05:03 +01:00
|
|
|
|
2011-10-12 11:32:18 +02:00
|
|
|
%files -n libibus-1_0-0
|
2010-03-26 18:05:03 +01:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/lib*.so.*
|
2012-01-25 02:48:20 +01:00
|
|
|
|
|
|
|
%files -n typelib-1_0-IBus-1_0
|
|
|
|
%defattr(-,root,root,-)
|
2011-06-19 14:48:28 +02:00
|
|
|
%{_libdir}/girepository-1.0/IBus-1.0.typelib
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
%files gtk
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so
|
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%if %suse_version >= 1140
|
2011-06-27 13:34:31 +02:00
|
|
|
|
2011-06-14 08:04:24 +02:00
|
|
|
%files gtk3
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-3.0/3.0.0/immodules/*
|
|
|
|
%endif
|
|
|
|
|
2010-03-26 18:05:03 +01:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
%{_includedir}/*
|
|
|
|
%{_datadir}/gtk-doc/html/*
|
|
|
|
%{_libdir}/pkgconfig/*
|
2011-06-19 14:48:28 +02:00
|
|
|
%{_datadir}/gir-1.0/IBus-1.0.gir
|
|
|
|
%dir %{_datadir}/vala
|
|
|
|
%{_datadir}/vala/*
|
2010-03-26 18:05:03 +01:00
|
|
|
|
|
|
|
%changelog
|