-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,6 @@ EXTRA_DIST = \ | |
noinst_DIST = \ | ||
$(NULL) | ||
|
||
|
||
DISTCLEANFILES = \ | ||
po/stamp-it \ | ||
$(NULL) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,11 @@ | |
%define mod_path ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@ | ||
%define host_vendor %(if [[ "%{_host_vendor}" == "unknown" ]]; then echo redhat; else echo %{_host_vendor}; fi) | ||
%define host %{_host_cpu}-%{host_vendor}-%{_host_os}-gnu | ||
%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 | ||
|
||
Name: ibus | ||
Version: @PACKAGE_VERSION@ | ||
Release: 1%{?dist} | ||
|
@@ -15,31 +20,42 @@ Source1: xinput-ibus | |
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
|
||
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999") | ||
|
||
BuildRequires: cvs | ||
BuildRequires: gettext-devel | ||
BuildRequires: libtool | ||
BuildRequires: python | ||
BuildRequires: gtk2-devel | ||
BuildRequires: dbus-devel | ||
# BuildRequires: qt-devel | ||
BuildRequires: dbus-glib-devel | ||
BuildRequires: dbus-python-devel | ||
BuildRequires: dbus-python-devel >= %{dbus_python_version} | ||
BuildRequires: desktop-file-utils | ||
BuildRequires: GConf2-devel | ||
|
||
Requires(post): desktop-file-utils | ||
Requires(post): %{_sbindir}/alternatives | ||
Requires(postun): desktop-file-utils | ||
Requires(postun): %{_sbindir}/alternatives | ||
BuildRequires: gtk-doc | ||
BuildRequires: GConf2-devel | ||
BuildRequires: pygobject2-devel | ||
BuildRequires: intltool | ||
# BuildRequires: qt-devel | ||
|
||
Requires: %{name}-libs = %{version}-%{release} | ||
Requires: glib2 >= %{glib_ver} | ||
Requires: %{name}-gtk = %{version}-%{release} | ||
|
||
Requires: pygtk2 | ||
Requires: dbus-python >= 0.83.0 | ||
Requires: notification-daemon | ||
Requires: pyxdg | ||
Requires: iso-codes | ||
Requires: dbus-python >= %{dbus_python_version} | ||
Requires: im-chooser >= %{im_chooser_version} | ||
Requires: GConf2 >= %{gconf2_version} | ||
|
||
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 | ||
|
||
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf | ||
|
||
|
@@ -52,14 +68,17 @@ developers to develop input method easily. | |
Summary: IBus libraries | ||
Group: System Environment/Libraries | ||
|
||
%description libs | ||
This package contains ibus libraries. | ||
Requires: glib2 >= %{glib_ver} | ||
Requires: dbus >= 1.2.4 | ||
|
||
%description libs | ||
This package contains the libraries for IBus | ||
|
||
%package gtk | ||
Summary: IBus im module for gtk2 | ||
Group: System Environment/Libraries | ||
Requires: %{name} = %{version}-%{release} | ||
Requires(post): glib2 >= %{glib_ver} | ||
|
||
%description gtk | ||
This package contains ibus im module for gtk2 | ||
|
@@ -69,7 +88,7 @@ This package contains ibus im module for gtk2 | |
# Group: System Environment/Libraries | ||
# Requires: %{name} = %{version}-%{release} | ||
# Requires: qt >= 4.4.2 | ||
# | ||
# | ||
# %description qt | ||
# This package contains ibus im module for qt4 | ||
|
||
|
@@ -84,11 +103,26 @@ Requires: dbus-devel | |
The ibus-devel package contains the header files and developer | ||
docs for ibus. | ||
|
||
%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 | ||
|
||
|
||
%prep | ||
%setup -q | ||
# %patch0 -p1 | ||
# ./autogen.sh --help | ||
|
||
%build | ||
%configure --disable-static --disable-iso-codes-check | ||
%configure --disable-static \ | ||
--disable-iso-codes-check \ | ||
--enable-gtk-doc \ | ||
--disable-qt4-immodule | ||
# make -C po update-gmo | ||
make %{?_smp_mflags} | ||
|
||
|
@@ -103,6 +137,10 @@ mkdir -pm 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/X11/xinit/xinput.d | |
install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf} | ||
|
||
# install .desktop files | ||
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop | ||
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop | ||
echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop | ||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop | ||
desktop-file-install --delete-original \ | ||
--dir $RPM_BUILD_ROOT%{_datadir}/applications \ | ||
$RPM_BUILD_ROOT%{_datadir}/applications/* | ||
|
@@ -112,64 +150,66 @@ desktop-file-install --delete-original \ | |
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%pre | ||
if [ "$1" -gt 1 ] ; then | ||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` | ||
gconftool-2 --makefile-uninstall-rule \ | ||
%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || : | ||
fi | ||
|
||
%post | ||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` | ||
gconftool-2 --makefile-install-rule \ | ||
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : | ||
update-desktop-database -q | ||
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || : | ||
|
||
%preun | ||
if [ "$1" -eq 0 ] ; then | ||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` | ||
gconftool-2 --makefile-uninstall-rule \ | ||
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : | ||
fi | ||
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || : | ||
|
||
%post libs | ||
/sbin/ldconfig | ||
update-desktop-database -q | ||
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || : | ||
%pre | ||
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 | ||
|
||
%post gtk | ||
%{_bindir}/update-gtk-immodules %{host} || : | ||
%preun | ||
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 || : | ||
fi | ||
|
||
%postun libs | ||
/sbin/ldconfig | ||
%postun | ||
update-desktop-database -q | ||
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 | ||
|
||
%post libs | ||
/sbin/ldconfig | ||
|
||
%postun libs | ||
/sbin/ldconfig | ||
|
||
%post gtk | ||
%{_bindir}/update-gtk-immodules %{_host} || : | ||
|
||
%postun gtk | ||
%{_bindir}/update-gtk-immodules %{host} || : | ||
%{_bindir}/update-gtk-immodules %{_host} || : | ||
|
||
%files -f %{name}.lang | ||
%defattr(-,root,root,-) | ||
%doc AUTHORS COPYING README | ||
%{python_sitelib}/ibus | ||
%dir %{python_sitelib}/ibus | ||
%{python_sitelib}/ibus/* | ||
%dir %{_datadir}/ibus/ | ||
%{_bindir}/ibus-daemon | ||
%{_bindir}/ibus-setup | ||
%{_datadir}/ibus | ||
%{_datadir}/ibus/* | ||
%{_datadir}/applications/* | ||
%{_datadir}/pixmaps/* | ||
%{_libexecdir}/ibus-gconf | ||
%{_libexecdir}/ibus-ui-gtk | ||
%{_libexecdir}/ibus-x11 | ||
%config(noreplace) %{_xinputconf} | ||
%config(noreplace) %{_sysconfdir}/gconf/schemas/%{name}.schemas | ||
%config(noreplace) %{_sysconfdir}/xdg/autostart/ibus.desktop | ||
# %{_sysconfdir}/xdg/autostart/ibus.desktop | ||
%{_sysconfdir}/gconf/schemas/ibus.schemas | ||
%config %{_xinputconf} | ||
|
||
%files libs | ||
%defattr(-,root,root,-) | ||
%{_libdir}/libibus.so* | ||
%{_libdir}/libibus.so.* | ||
|
||
%files gtk | ||
%defattr(-,root,root,-) | ||
|
@@ -183,13 +223,11 @@ fi | |
%defattr(-,root,root,-) | ||
%{_libdir}/lib*.so | ||
%{_includedir}/* | ||
%{_datadir}/gtk-doc/html/* | ||
%{_libdir}/pkgconfig/* | ||
|
||
%files devel-docs | ||
%{_datadir}/gtk-doc/html/* | ||
|
||
%changelog | ||
* @DATE_DISPLAY@ Huang Peng <[email protected]> - @VERSION@-1 | ||
* @DATE_DISPLAY@ Peng Huang <[email protected]> - @VERSION@-1 | ||
- Current version. | ||
|
||
* Thu Aug 07 2008 Huang Peng <[email protected]> - 0.1.0.20080810-1 | ||
- The first version. | ||
|