2008-06-24 21:12:28 +04:00
|
|
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
2010-06-05 17:28:04 +04:00
|
|
|
%{!?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)}
|
2009-12-27 04:53:27 +03:00
|
|
|
|
2012-01-05 01:48:16 +04:00
|
|
|
# Build flags
|
|
|
|
%define build_python_library 0
|
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
|
|
|
|
%define gconf2_version 2.12.0
|
|
|
|
%define dbus_python_version 0.83.0
|
|
|
|
%define im_chooser_version 1.2.5
|
|
|
|
|
2008-06-24 21:12:28 +04:00
|
|
|
Name: ibus
|
2011-09-18 18:36:02 +04:00
|
|
|
Version: @IBUS_VERSION@
|
2008-06-24 21:12:28 +04:00
|
|
|
Release: 1%{?dist}
|
2008-10-07 08:59:46 +04:00
|
|
|
Summary: Intelligent Input Bus for Linux OS
|
2008-06-24 21:12:28 +04:00
|
|
|
License: LGPLv2+
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
URL: http://code.google.com/p/ibus/
|
|
|
|
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
2008-07-03 14:33:24 +04:00
|
|
|
Source1: xinput-ibus
|
2009-12-27 04:53:27 +03:00
|
|
|
# Patch0: ibus-HEAD.patch
|
2008-06-24 21:12:28 +04:00
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
2008-08-08 13:15:15 +04:00
|
|
|
|
2009-02-05 05:39:56 +03:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
BuildRequires: cvs
|
2008-08-08 13:15:15 +04:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: python
|
|
|
|
BuildRequires: gtk2-devel
|
2010-06-05 17:28:04 +04:00
|
|
|
BuildRequires: gtk3-devel
|
2008-08-08 13:15:15 +04:00
|
|
|
BuildRequires: dbus-glib-devel
|
2009-06-17 11:40:57 +04:00
|
|
|
BuildRequires: dbus-python-devel >= %{dbus_python_version}
|
2008-10-07 08:27:08 +04:00
|
|
|
BuildRequires: desktop-file-utils
|
2009-06-17 11:40:57 +04:00
|
|
|
BuildRequires: gtk-doc
|
|
|
|
BuildRequires: GConf2-devel
|
|
|
|
BuildRequires: pygobject2-devel
|
|
|
|
BuildRequires: intltool
|
2010-04-21 06:42:40 +04:00
|
|
|
BuildRequires: iso-codes-devel
|
2008-08-08 13:15:15 +04:00
|
|
|
|
2009-02-15 10:51:16 +03:00
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
2010-06-05 17:28:04 +04:00
|
|
|
Requires: %{name}-gtk2 = %{version}-%{release}
|
|
|
|
Requires: %{name}-gtk3 = %{version}-%{release}
|
2009-06-17 11:40:57 +04:00
|
|
|
|
2008-08-08 13:15:15 +04:00
|
|
|
Requires: pygtk2
|
2008-10-07 14:32:09 +04:00
|
|
|
Requires: pyxdg
|
2008-09-30 04:26:02 +04:00
|
|
|
Requires: iso-codes
|
2009-06-17 11:40:57 +04:00
|
|
|
Requires: dbus-python >= %{dbus_python_version}
|
|
|
|
Requires: im-chooser >= %{im_chooser_version}
|
|
|
|
Requires: GConf2 >= %{gconf2_version}
|
2009-12-27 04:53:27 +03:00
|
|
|
Requires: notify-python
|
2010-04-24 04:16:16 +04:00
|
|
|
Requires: librsvg2
|
2009-06-17 11:40:57 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
Obsoletes: ibus-qt < 1.1.0
|
2008-06-24 21:12:28 +04:00
|
|
|
|
2009-02-05 05:39:56 +03:00
|
|
|
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf
|
|
|
|
|
2008-06-24 21:12:28 +04:00
|
|
|
%description
|
2009-12-27 04:53:27 +03:00
|
|
|
IBus means Intelligent Input Bus. It is an input framework for Linux OS.
|
2008-06-24 21:12:28 +04:00
|
|
|
|
2009-02-15 10:51:16 +03:00
|
|
|
%package libs
|
|
|
|
Summary: IBus libraries
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
Requires: glib2 >= %{glib_ver}
|
|
|
|
Requires: dbus >= 1.2.4
|
2009-02-15 10:51:16 +03:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%description libs
|
|
|
|
This package contains the libraries for IBus
|
2009-02-15 10:51:16 +03:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%package gtk2
|
2008-10-07 08:27:08 +04:00
|
|
|
Summary: IBus im module for gtk2
|
2008-06-24 21:12:28 +04:00
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2009-06-17 11:40:57 +04:00
|
|
|
Requires(post): glib2 >= %{glib_ver}
|
2008-06-24 21:12:28 +04:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%description gtk2
|
2008-06-24 21:12:28 +04:00
|
|
|
This package contains ibus im module for gtk2
|
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%package gtk3
|
|
|
|
Summary: IBus im module for gtk3
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires(post): glib2 >= %{glib_ver}
|
|
|
|
|
|
|
|
%description gtk3
|
|
|
|
This package contains ibus im module for gtk3
|
|
|
|
|
2009-02-05 05:39:56 +03:00
|
|
|
%package devel
|
|
|
|
Summary: Development tools for ibus
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: glib2-devel
|
|
|
|
Requires: dbus-devel
|
|
|
|
|
|
|
|
%description devel
|
2009-12-27 04:53:27 +03:00
|
|
|
The ibus-devel package contains the header files and developer
|
|
|
|
docs for ibus.
|
2008-07-03 14:33:24 +04:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%package devel-docs
|
|
|
|
Summary: Developer documents for ibus
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: gtk-doc
|
|
|
|
|
|
|
|
%description devel-docs
|
|
|
|
The ibus-devel-docs package contains developer documentation for ibus
|
|
|
|
|
|
|
|
|
2008-06-24 21:12:28 +04:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2009-06-17 11:40:57 +04:00
|
|
|
# %patch0 -p1
|
2008-06-24 21:12:28 +04:00
|
|
|
|
|
|
|
%build
|
2012-01-05 01:48:16 +04:00
|
|
|
|
|
|
|
OPTIONS="--disable-static --enable-gtk2 --enable-gtk3 --enable-xim --disable-gtk-doc --enable-introspection"
|
|
|
|
|
|
|
|
%if %{build_python_library}
|
|
|
|
OPTIONS="$OPTIONS --enable-python-library"
|
|
|
|
%else
|
|
|
|
OPTIONS="$OPTIONS --disable-python-library"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%configure $OPTIONS
|
2010-06-12 04:06:22 +04:00
|
|
|
|
2008-06-24 21:12:28 +04:00
|
|
|
# make -C po update-gmo
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2009-12-27 04:53:27 +03:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2011-08-11 05:46:27 +04:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-1.0.la
|
2010-06-05 17:28:04 +04:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.la
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.la
|
2008-06-24 21:12:28 +04:00
|
|
|
|
2008-07-03 14:33:24 +04:00
|
|
|
# install xinput config file
|
2009-12-27 04:53:27 +03:00
|
|
|
install -pm 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_xinputconf}
|
2008-07-03 14:33:24 +04:00
|
|
|
|
2008-10-07 08:27:08 +04:00
|
|
|
# install .desktop files
|
2009-06-17 11:40:57 +04:00
|
|
|
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop
|
|
|
|
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop
|
2008-10-07 08:27:08 +04:00
|
|
|
desktop-file-install --delete-original \
|
|
|
|
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/applications/*
|
|
|
|
|
2011-08-11 05:46:27 +04:00
|
|
|
%find_lang %{name}10
|
2008-06-24 21:12:28 +04:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2009-03-27 07:17:35 +03:00
|
|
|
%post
|
2009-09-04 08:05:10 +04:00
|
|
|
# recreate icon cache
|
|
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
|
|
[ -x %{_bindir}/gtk-update-icon-cache ] && \
|
|
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
2009-03-27 07:17:35 +03:00
|
|
|
|
|
|
|
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
2009-06-17 11:40:57 +04:00
|
|
|
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
|
2009-03-27 07:17:35 +03:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%pre
|
|
|
|
if [ "$1" -gt 1 ]; then
|
2009-12-27 04:53:27 +03:00
|
|
|
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
|
|
|
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
|
2009-06-17 11:40:57 +04:00
|
|
|
fi
|
2008-08-07 09:00:10 +04:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%preun
|
|
|
|
if [ "$1" -eq 0 ]; then
|
2009-12-27 04:53:27 +03:00
|
|
|
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
|
|
|
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
|
2009-06-17 11:40:57 +04:00
|
|
|
fi
|
2008-06-24 21:27:46 +04:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%postun
|
2009-09-04 08:05:10 +04:00
|
|
|
# recreate icon cache
|
|
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
|
|
[ -x %{_bindir}/gtk-update-icon-cache ] && \
|
|
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
|
|
|
2008-10-07 08:27:08 +04:00
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
|
|
|
|
# if alternative was set to manual, reset to auto
|
|
|
|
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
|
|
|
|
fi
|
|
|
|
|
2009-12-27 04:53:27 +03:00
|
|
|
%post libs -p /sbin/ldconfig
|
2009-06-17 11:40:57 +04:00
|
|
|
|
2009-12-27 04:53:27 +03:00
|
|
|
%postun libs -p /sbin/ldconfig
|
2009-06-17 11:40:57 +04:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%post gtk2
|
2010-06-05 17:44:54 +04:00
|
|
|
%{_bindir}/update-gtk-immodules %{_host}
|
2009-06-17 11:40:57 +04:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%postun gtk2
|
2010-06-05 17:44:54 +04:00
|
|
|
%{_bindir}/update-gtk-immodules %{_host}
|
2008-07-01 13:26:52 +04:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%post gtk3
|
2010-06-05 17:44:54 +04:00
|
|
|
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache
|
2010-06-05 17:28:04 +04:00
|
|
|
|
|
|
|
%postun gtk3
|
2010-06-05 17:44:54 +04:00
|
|
|
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache
|
2010-06-05 17:28:04 +04:00
|
|
|
|
2011-08-11 05:46:27 +04:00
|
|
|
%files -f %{name}10.lang
|
2008-06-24 21:12:28 +04:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS COPYING README
|
2012-01-05 01:48:16 +04:00
|
|
|
|
|
|
|
%if %{build_python_library}
|
|
|
|
%dir %{python_sitelib}/ibus
|
|
|
|
%{python_sitelib}/ibus/*
|
|
|
|
%endif
|
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%dir %{_datadir}/ibus/
|
2011-12-16 02:56:16 +04:00
|
|
|
%{_bindir}/ibus
|
2009-02-05 05:39:56 +03:00
|
|
|
%{_bindir}/ibus-daemon
|
2008-07-10 11:34:03 +04:00
|
|
|
%{_bindir}/ibus-setup
|
2009-06-17 11:40:57 +04:00
|
|
|
%{_datadir}/ibus/*
|
2008-08-04 06:45:33 +04:00
|
|
|
%{_datadir}/applications/*
|
2009-10-13 06:22:06 +04:00
|
|
|
%{_datadir}/icons/hicolor/*/apps/*
|
2009-02-05 05:39:56 +03:00
|
|
|
%{_libexecdir}/ibus-gconf
|
2012-01-05 01:48:16 +04:00
|
|
|
%if %{build_python_library}
|
|
|
|
%{_libexecdir}/ibus-ui-gtk
|
|
|
|
%endif
|
2011-12-14 21:54:39 +04:00
|
|
|
%{_libexecdir}/ibus-ui-gtk3
|
2009-02-05 05:39:56 +03:00
|
|
|
%{_libexecdir}/ibus-x11
|
2011-12-14 21:54:39 +04:00
|
|
|
%{_libexecdir}/ibus-engine-simple
|
2009-06-17 11:40:57 +04:00
|
|
|
# %{_sysconfdir}/xdg/autostart/ibus.desktop
|
|
|
|
%{_sysconfdir}/gconf/schemas/ibus.schemas
|
2011-12-16 02:56:16 +04:00
|
|
|
%{_sysconfdir}/bash_completion.d/ibus.bash
|
2009-06-17 11:40:57 +04:00
|
|
|
%config %{_xinputconf}
|
2009-02-15 10:51:16 +03:00
|
|
|
|
|
|
|
%files libs
|
|
|
|
%defattr(-,root,root,-)
|
2011-08-11 05:46:27 +04:00
|
|
|
%{_libdir}/libibus-1.0.so.*
|
|
|
|
%{_libdir}/girepository-1.0/IBus-1.0.typelib
|
2009-02-15 10:51:16 +03:00
|
|
|
|
2010-06-05 17:28:04 +04:00
|
|
|
%files gtk2
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.so
|
|
|
|
|
|
|
|
%files gtk3
|
2008-08-07 09:00:10 +04:00
|
|
|
%defattr(-,root,root,-)
|
2010-06-05 17:28:04 +04:00
|
|
|
%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.so
|
2008-06-24 21:12:28 +04:00
|
|
|
|
2009-02-05 05:39:56 +03:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
%{_libdir}/pkgconfig/*
|
2010-06-01 17:36:08 +04:00
|
|
|
%{_includedir}/*
|
2011-08-11 05:46:27 +04:00
|
|
|
%{_datadir}/gir-1.0/IBus-1.0.gir
|
|
|
|
%{_datadir}/vala/vapi/ibus-1.0.vapi
|
|
|
|
%{_datadir}/vala/vapi/ibus-1.0.deps
|
2009-02-05 05:39:56 +03:00
|
|
|
|
2009-06-17 11:40:57 +04:00
|
|
|
%files devel-docs
|
2009-12-27 04:53:27 +03:00
|
|
|
%defattr(-,root,root,-)
|
2009-06-17 11:40:57 +04:00
|
|
|
%{_datadir}/gtk-doc/html/*
|
|
|
|
|
2008-06-24 21:12:28 +04:00
|
|
|
%changelog
|
2011-09-18 18:36:02 +04:00
|
|
|
* @DATE_DISPLAY@ Peng Huang <shawn.p.huang@gmail.com> - @IBUS_VERSION@-1
|
2009-03-27 07:17:35 +03:00
|
|
|
- Current version.
|