Browse Source

ibus:
- update to upstream snapshot (1.3.99.20110817)
- add ibus-gjs for gnome3
- update patches



git-svn-id: http://trac.vinelinux.org/repos/projects/specs@4641 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 13 years ago
parent
commit
adb679ad84
1 changed files with 106 additions and 22 deletions
  1. 106 22
      i/ibus/ibus-vl.spec

+ 106 - 22
i/ibus/ibus-vl.spec

@@ -1,5 +1,16 @@
-%define	ver 1.3.9
-%define	rel 5
+%define snapshot 20110817
+%define	ver 1.3.99.%{snapshot}
+%define	rel 1
+
+%if "%{?_dist_release}" >= "vl7"
+%define have_gjsfile 1
+%define have_libxkbfile 1
+%else
+%define have_gjsfile 0
+%define have_xkbfile 0
+%endif
+
+%define ibus_api_version 1.0
 
 Summary: Intelligent Input Bus for Linux / Unix OS
 Name: ibus
@@ -10,12 +21,11 @@ Group: System Environment/Libraries
 URL: http://code.google.com/p/ibus/
 
 Source0: %{name}-%{version}.tar.gz
-Patch0: ibus-1.2.0.20091024-fixPOFILES.in.patch
-# https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/716314
-# Use LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines
-Patch1: ibus-1.3.9-locale-parser.patch
-# add default preload engines
-Patch10: ibus-1.3.9-add-preload-engines.patch
+Source1: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-1.3.99.20110814.tar.gz
+
+Patch1:     ibus-530711-preload-sys.patch
+Patch4:     ibus-541492-xkb.patch
+
 # add Shift+space as trigger key instead of Ctrl+space
 Patch20: ibus-1.3.9-vine.patch
 
@@ -34,6 +44,13 @@ BuildRequires: glib2-devel >= 2.0.0
 %if %{?_dist_release} != "vl5"
 BuildRequires: gtk3-devel >= 3.0.0
 %endif
+%if %have_gjsfile
+BuildRequires: gjs
+BuildRequires: gnome-shell
+%endif
+%if %have_libxkbfile
+BuildRequires: libxkbfile-devel
+%endif
 BuildRequires: GConf2-devel >= 2.12
 BuildRequires: perl >= 5.8.1 perl-XML-Parser
 Buildrequires: python >= 2.5
@@ -60,9 +77,9 @@ Requires:   vala
 %description devel
 Header files for iBus.
 
-%if %{?_dist_release} != "vl5"
 %package gtk3
-Summary: Ibus im module for gtk3
+Summary: IBus im module for gtk3
+Summary(ja): gtk3 用 IBus IMモジュール
 Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires(post):	glib2
@@ -70,29 +87,69 @@ Requires(post):	glib2
 %description gtk3
 The ibus-gtk3 contains ibus im module for gtk3.
 
-%endif
+%package gnome3
+Summary:    IBus gnome-shell-extension for GNOME3
+Summary(ja): GNOME3 用 IBus gnome-shell 拡張
+Group:      System Environment/Libraries
+Requires:   %{name} = %{version}-%{release}
+Requires:   gnome-shell
+
+%description gnome3
+This is a transitional package which allows users to try out new IBus
+GUI for GNOME3 in development.  Note that this package will be marked
+as obsolete once the integration has completed in the GNOME3 upstream.
+
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch10 -p1 -b .add-default-preload-engine
+%if %have_gjsfile
+zcat %SOURCE1 | tar xf -
+%endif
+
+%patch1 -p1 -b .preload-sys
+%if %have_libxkbfile
+%patch4 -p1 -b .xkb
+%endif
+
 %patch20 -p1 -b .vine
+
+%if %have_libxkbfile
+aclocal -I m4
+autoheader
+autoconf -f
+automake -a -c -f
+%endif
 %configure \
 	--disable-static \
 %if %{?_dist_release} != "vl5"
 	--enable-gtk3 \
 %endif
-	--with-gtk2-im-module-dir=%{_libdir}/gtk-2.0/immodules
+	--enable-gtk2 \
+	--with-gtk2-im-module-dir=%{_libdir}/gtk-2.0/immodules \
+	--enable-xim \
+	--disable-gtk-doc \
+	--with-no-snooper-apps='gnome-do,Do.*,firefox.*,:*chrome.*,.*chromium.*' \
+	--enable-surrounding-text \
+	--enable-introspection
 
 %build
 make %{?_smp_mflags}
 
+%if %have_gjsfile
+d=`basename %SOURCE1 .tar.gz`
+cd $d
+export PKG_CONFIG_PATH=..:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
+%configure
+make %{?_smp_mflags}
+cd ..
+%endif
+
+
 %install
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
-rm -rf %{buildroot}%{_libdir}/libibus.la
+rm -rf %{buildroot}%{_libdir}/libibus-%{ibus_api_version}.la
 rm -rf %{buildroot}%{_libdir}/gtk-2.0/immodules/im-ibus.la
 %if %{?_dist_release} != "vl5"
 rm -rf %{buildroot}%{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.la
@@ -106,7 +163,17 @@ rm -rf %{buildroot}%{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.la
 
 rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/ibus.desktop
 
-%find_lang %{name}
+%if %have_gjsfile
+# https://bugzilla.redhat.com/show_bug.cgi?id=657165
+d=`basename %SOURCE1 .tar.gz`
+cd $d
+make DESTDIR=$RPM_BUILD_ROOT install
+rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/ibus-gjs.mo
+cd ..
+%endif
+
+
+%find_lang %{name}10
 
 %clean 
 rm -rf %{buildroot}
@@ -165,11 +232,11 @@ touch --no-create %{_datadir}/icons/hicolor || :
 
 %endif
 
-%files -f %{name}.lang
+%files -f %{name}10.lang
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING ChangeLog NEWS README
 %{_bindir}/ibus*
-%{_libdir}/libibus.so.*
+%{_libdir}/libibus-%{ibus_api_version}.so.*
 %{_libdir}/gtk-2.0/immodules/im-ibus.so
 %{_libexecdir}/ibus-gconf
 %{_libexecdir}/ibus-ui-gtk
@@ -182,13 +249,18 @@ touch --no-create %{_datadir}/icons/hicolor || :
 %{_datadir}/icons/hicolor/*/apps/*
 #%{_sysconfdir}/xdg/autostart/ibus.desktop
 %{_sysconfdir}/gconf/schemas/ibus.schemas
+%if %have_libxkbfile
+%{_libexecdir}/ibus-engine-xkb
+%{_libexecdir}/ibus-xkb
+%endif
 
 %files devel
 %defattr(-,root,root,-)
-%{_libdir}/pkgconfig/ibus-1.0.pc
-%{_libdir}/libibus.so
-%{_includedir}/ibus-1.0
+%{_libdir}/pkgconfig/*
+%{_libdir}/lib*.so
+%{_includedir}/*
 %{_datadir}/vala/vapi/ibus-1.0.vapi
+%{_datadir}/vala/vapi/ibus-1.0.deps
 %if %{?_dist_release} != "vl5"
 %{_libdir}/girepository-1.0/IBus-1.0.typelib
 %{_datadir}/gir-1.0/IBus-1.0.gir
@@ -200,7 +272,19 @@ touch --no-create %{_datadir}/icons/hicolor || :
 %{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.so
 %endif
 
+%if %have_gjsfile
+%files gnome3
+%defattr(-,root,root,-)
+%{_datadir}/gnome-shell/js/ui/status/ibus
+%{_datadir}/gnome-shell/extensions/ibus-indicator@example.com
+%endif
+
 %changelog
+* Tue Aug 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.99.20110817-1
+- update to upstream snapshot (1.3.99.20110817)
+- add ibus-gjs for gnome3
+- update patches
+
 * Thu Jun 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.9-5
 - add patch1 from ubuntu (accepted in upstream)
   Use LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines.