File uim.spec of Package uim
#
# spec file for package uim (Version 1.6.0)
#
# Copyright (c) 2009 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/
#
Name: uim
BuildRequires: anthy-devel
BuildRequires: emacs-x11
BuildRequires: gcc-c++
BuildRequires: gnome-panel-devel
BuildRequires: intltool
BuildRequires: libexpat-devel
BuildRequires: libgnomeui-devel
BuildRequires: ncurses-devel
BuildRequires: perl-XML-Parser
BuildRequires: pkg-config
%if 0%{?suse_version} > 1130
BuildRequires: pkgconfig(gtk+-2.0)
%else
BuildRequires: gtk2-devel
%endif
BuildRequires: qt3-devel
BuildRequires: update-desktop-files
BuildRequires: xemacs
BuildRequires: libkde4-devel
BuildRequires: ebdev
BuildRequires: m17n-lib-devel
BuildRequires: m17n-contrib
BuildRequires: libedit-devel
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%endif
Version: 1.6.1
Release: 1.1
# xorg-x11-libXdmcp-devel libgnomeprintui-devel
License: GPLv2+
Summary: A multilingual input method library
Url: http://code.google.com/p/uim/
Group: System/I18n/Japanese
AutoReqProv: on
Source0: http://uim.googlecode.com/files/uim-%{version}.tar.bz2
Source1: suse-start-uim.el
Source2: xemacs-auto-autoloads.el
Source3: etc-x11-xim.d-uim
Patch1: qt-build.patch
Patch10: uim-sigscheme-build-fixes.diff
PreReq: %{_bindir}/touch
Provides: locale(xorg-x11:ja)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Uim is a multilingual input method library. Uim's project goal is to
provide secure and useful input method for all languages. Currently, it
can input to applications which support gtk+'s immodule or XIM.
%package devel
License: GPLv2+
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: glibc-devel
%description devel
Include Files and Libraries mandatory for Development.
%package gtk2
License: GPLv2+
Summary: Control applet using gnome2
Group: System/I18n/Japanese
Requires: %{name} = %{version}
Provides: uim-applet
Provides: locale(gnome-libs:ja)
%if 0%{?suse_version} > 1130
%gtk2_immodule_requires
%endif
%description gtk2
Control applet using gnome2
%package qt
License: GPLv2+
Summary: Qt3 input module plugin for uim
Group: System/I18n/Japanese
Requires: %{name} = %{version}
Provides: locale(qt3:ja)
%description qt
Qt3 input module plugin for uim
%package qt4
License: GPLv2+
Summary: Qt4 input module plugin for uim
Group: System/I18n/Japanese
Requires: %{name} = %{version}
Requires: uim-qt = %{version}
%kde4_runtime_requires
Provides: locale(libqt4:ja)
%description qt4
Qt4 input module plugin for uim
%prep
%setup0 -q
%patch1 -p1
%patch10 -p1
%if 0%{?suse_version} >= 1110
%endif
cp emacs/README README.emacs
iconv -f euc-jp -t utf-8 < emacs/README.ja > README.ja.emacs
%build
%configure --disable-static --with-pic \
--libexecdir=%{_prefix}/lib/uim \
--with-canna\
--with-anthy-utf8 \
--with-qt\
--with-qt-immodule \
--with-qt4 \
--with-qt4-immodule \
--enable-dict \
--with-eb \
--with-eb-conf=/etc/eb.conf \
--disable-kde-applet \
--enable-kde4-applet
# --disable-scm-nested-eval --enable-callback-queue\
make %{?_smp_mflags}
%install
make install-strip DESTDIR=%{?buildroot}
rm -f %{buildroot}%{_includedir}/gcroots.h
rm -f %{buildroot}%{_libdir}/pkgconfig/gcroots.pc
mkdir -p %{buildroot}%{_sysconfdir}/X11/xim.d/ja
install -m 644 $RPM_SOURCE_DIR/etc-x11-xim.d-uim \
%{buildroot}%{_sysconfdir}/X11/xim.d/uim
pushd %{buildroot}%{_sysconfdir}/X11/xim.d/ja
ln -s ../uim 60-uim
popd
# GNU Emacs:
install -m 644 $RPM_SOURCE_DIR/suse-start-uim.el %{buildroot}%{_datadir}/emacs/site-lisp/
pushd %{buildroot}%{_datadir}/emacs/site-lisp/uim-el
for i in $(find . -name "*.el")
do
emacs -no-site-file -q -batch -eval '(setq load-path (cons "." load-path))' -f batch-byte-compile $i
done
popd
# XEmacs
mkdir -p %{buildroot}%{_datadir}/xemacs/site-packages/lisp/uim-el
install -m 644 emacs/*.el %{buildroot}%{_datadir}/xemacs/site-packages/lisp/uim-el
pushd %{buildroot}%{_datadir}/xemacs/site-packages/lisp/uim-el
for i in $(find . -name "*.el")
do
xemacs -no-site-file -q -batch -eval '(setq load-path (cons "." load-path))' -f batch-byte-compile $i
done
popd
install -m 644 $RPM_SOURCE_DIR/xemacs-auto-autoloads.el \
%{buildroot}%{_datadir}/xemacs/site-packages/lisp/uim-el/auto-autoloads.el
# replace buildroot in comments in .elc files by spaces with the same total length:
BUILD_ROOT_REPLACEMENT=$(echo %{buildroot} | tr [:print:] ' ')
for i in $(find %{buildroot} -name "*.elc")
do
perl -pi -e "s|(;;; from file )%{buildroot}(%{_datadir}/xemacs/site-packages/.*)|\1BUILD_ROOT_REPLACEMENT\2|" $i
perl -pi -e "s|(;;; from file )%{buildroot}(%{_datadir}/emacs/site-lisp/.*)|\1BUILD_ROOT_REPLACEMENT\2|" $i
done
%find_lang uim
%find_lang uim-chardict-qt
%find_lang uim-chardict-qt4
%suse_update_desktop_file uim System SystemSetup
%suse_update_desktop_file %{_builddir}/uim-%{version}/qt4/toolbar/plasma-applet-uim.desktop System Applet
strip %{buildroot}/%{_libdir}/kde4/plasma_applet_uim.so
%kde_post_install
find %{buildroot} -name "*.scm" \
| grep -E -v "installed-modules.scm|loader.scm" \
| sort | uniq | perl -p -e "s|%{buildroot}||" >> uim.lang
%if 0%{?suse_version} > 1020
%fdupes %{buildroot}%{_prefix}/share
%endif
find %{buildroot} -type f -name "*.la" -delete -print
rm -f %{_builddir}/uim-%{version}/doc/Makefile*
%clean
rm -rf %{buildroot}
%post
/sbin/ldconfig
%postun -p /sbin/ldconfig
%post gtk2
%if 0%{?suse_version} > 1130
%gtk2_immodule_post
%else
# trigger run of SuSEconfig.gtk2 to register/unregister this input module
# by calling gtk-query-immodules-2.0:
touch var/adm/SuSEconfig/run-gtk
%endif
%postun gtk2
%if 0%{?suse_version} > 1130
%gtk2_immodule_postun
%else
# trigger run of SuSEconfig.gtk2 to register/unregister this input module
# by calling gtk-query-immodules-2.0:
touch var/adm/SuSEconfig/run-gtk
%endif
%files -n uim -f uim.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog* INSTALL* NEWS* README*
%doc doc
%dir %{_sysconfdir}/X11/xim.d/
%config %{_sysconfdir}/X11/xim.d/uim
%dir %{_sysconfdir}/X11/xim.d/ja/
%config %{_sysconfdir}/X11/xim.d/ja/60-uim
%dir %{_datadir}/uim
%dir %{_datadir}/uim/lib
%{_datadir}/uim/installed-modules.scm
%{_datadir}/uim/loader.scm
%dir %{_datadir}/uim/pixmaps/
%{_datadir}/uim/pixmaps/*
%dir %{_datadir}/uim/tables/
%{_datadir}/uim/tables/*.table
%{_bindir}/uim-help
%{_bindir}/uim-sh
%{_bindir}/uim-module-manager
%{_bindir}/uim-xim
%{_bindir}/uim-fep
%{_bindir}/uim-fep-tick
%{_bindir}/uim-el-agent
%{_bindir}/uim-el-helper-agent
%{_bindir}/uim-m17nlib-relink-icons
%{_libdir}/*.so.*
%dir %{_libdir}/uim
%if "%{_libdir}" != "%{_prefix}/lib"
%dir %{_prefix}/lib/uim
%endif
%{_prefix}/lib/uim/uim-helper-server
%{_prefix}/lib/uim/uim-toolbar-applet
%{_prefix}/lib/uim/uim-candwin-gtk
%{_prefix}/lib/uim/uim-candwin-tbl-gtk
%dir %{_libdir}/uim/plugin/
%{_libdir}/uim/plugin/*.so
%doc %{_mandir}/man1/*.1.gz
%{_datadir}/applications/%{name}.desktop
%{_datadir}/emacs/site-lisp/*
%dir %{_datadir}/xemacs/site-packages/
%dir %{_datadir}/xemacs/site-packages/lisp/
%dir %{_datadir}/xemacs/site-packages/lisp/uim-el/
%{_datadir}/xemacs/site-packages/lisp/uim-el/*
%files -n uim-devel
%defattr(-, root, root)
%{_libdir}/*.so
%dir %{_includedir}/uim
%{_includedir}/uim/*
%{_libdir}/pkgconfig/uim.pc
%files -n uim-gtk2
%defattr(-, root, root)
%{_bindir}/uim-im-switcher-gtk
%{_bindir}/uim-input-pad-ja
%{_bindir}/uim-toolbar-gtk
%{_bindir}/uim-toolbar-gtk-systray
%{_bindir}/uim-pref-gtk
%{_bindir}/uim-dict-gtk
%{_libdir}/bonobo/servers/*.server
%{_libdir}/gtk-*/*/immodules/*.so
%{_datadir}/uim/helperdata/uim-dict-ui.xml
%files -n uim-qt -f uim-chardict-qt.lang
%defattr(-, root, root)
%{_bindir}/uim-chardict-qt
%{_bindir}/uim-im-switcher-qt
%{_bindir}/uim-pref-qt
%{_bindir}/uim-toolbar-qt
%{_prefix}/lib/qt3/plugins/inputmethods/*.so
%{_prefix}/lib/uim/uim-candwin-qt
%dir %{_datadir}/uim/helperdata/
%{_datadir}/uim/helperdata/bushu.t
%{_datadir}/locale/ja/LC_MESSAGES/uim-chardict-qt.mo
%files -n uim-qt4 -f uim-chardict-qt4.lang
%defattr(-, root, root)
%{_bindir}/uim-chardict-qt4
%{_bindir}/uim-im-switcher-qt4
%{_bindir}/uim-pref-qt4
%{_bindir}/uim-toolbar-qt4
%{_libdir}/qt4/plugins/inputmethods/*
%{_libdir}/kde4/plasma_applet_uim.so
%{_datadir}/kde4/services/plasma-applet-uim.desktop
%{_prefix}/lib/uim/uim-candwin-qt4
%{_datadir}/locale/ja/LC_MESSAGES/uim-chardict-qt4.mo
%changelog
* Tue Sep 15 2009 crrodriguez@novell.com
- do not package static libraries
* Thu Jul 9 2009 tiwai@suse.de
- removed unused patches
* Thu Jul 2 2009 tiwai@suse.de
- updated to version 1.5.6:
* lots of changes, see
http://uim.googlecode.com/svn/tags/uim-1.5.6/NEWS
- enable qt4 immodule
- enable anthy-utf8 IM
* Thu Jun 4 2009 tiwai@suse.de
- fix build for older distros
* Sun Feb 22 2009 vuntz@novell.com
- Add uim-fix-gnome-compilation.patch to fix build. The patch
should probably be sent upstream if the latest version still has
the issue (upstream is at 1.5.5 now).
- Add libgnomeui-devel BuildRequires for the patch.
* Tue Nov 25 2008 sbrabec@suse.cz
- Supplement gtk2-32bit/gtk2-64bit and qt3-32bit/qt3-64bit in
baselibs.conf (bnc#354164).
* Fri Oct 17 2008 mfabian@suse.de
- bnc#436245: Emacs cannot start flawlessly from within a directory
containing umlauts in it's name: fix by loading uim-leim
not immediately in suse-start-uim.el but rather load it in
'emacs-startup-hook.
(Fixed by Werner Fink <werner@suse.de>).
- fix build in Factory (add “intltoolize --force -c --automake”)
* Fri Jan 11 2008 mfabian@suse.de
- include missing headers to make it build on STABLE.
- use fdupes
* Mon May 7 2007 mfabian@suse.de
- Bugzilla #271696: fix bug in uim start script which made it
impossible to set uim as the default input method.
Thanks to Satoshi Niimi <sa2c@sa2c.net> for the report and the
fix.
* Sat Mar 31 2007 aj@suse.de
- Cleanup BuildRequires.
* Mon Feb 5 2007 ro@suse.de
- fix build
* Fri Feb 2 2007 sbrabec@suse.cz
- Removed references to /opt/gnome.
- Bi-arch libexecdir fix.
- Package each file only once.
- Use %%ghost for autogenerated files.
* Mon Dec 25 2006 schwab@suse.de
- Fix format string bugs.
- Make uim-el less chatty.
- Remove inappropriate advice.
- Don't clobber current-input-method-title.
* Fri Sep 15 2006 mfabian@suse.de
- make auto-autoloads.el for XEmacs really work.
- make vertical candidate list display the default.
* Thu Sep 14 2006 mfabian@suse.de
- add uim-el for XEmacs.
- byte-compile the .el files for Emacs and XEmacs.
- add suse-start-uim.el for Emacs and auto-autoloads.el for XEmacs
to be able to use uim-el without further setup.
* Mon Sep 11 2006 mfabian@suse.de
- update to 1.2.1.
- new subpackage uim-qt (used to be build from a different
tarball but it is now included in uim).
* Mon Jun 19 2006 schwab@suse.de
- Work around broken use of configure substitutions.
* Tue Feb 28 2006 mfabian@suse.de
- add "Provides: locale(...)".
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 18 2006 schwab@suse.de
- Fix garbage collector.
- Use RPM_OPT_FLAGS.
- Fix aliasing bugs.
* Fri Aug 26 2005 mfabian@suse.de
- Bugzilla #113081: uim should register the input modules in the
%%post script.
* Thu Aug 25 2005 mfabian@suse.de
- Bugzilla #112931: gtk2 specific stuff in %%post and %%postun should
be moved to the proper sub-package.
* Mon Aug 8 2005 mfabian@suse.de
- update to 0.4.8.
* Tue May 31 2005 mfabian@suse.de
- update to 0.4.6 svn revison 850.
remove ipa-x-sampa.patch (included).
* Mon Apr 25 2005 mfabian@suse.de
- update to 0.4.6 svn revision 828.
- fix a small problem in ipa-x-sampa: mnenonic for U+02D0 and
U+02D1 is ':' and ':\' respectively (not ';' and ';\').
* Thu Feb 24 2005 mfabian@suse.de
- Bugzilla #66448: update to 0.4.6 svn revision 714
to fix a security problem (CAN-2005-0503).
* Tue Feb 22 2005 mfabian@suse.de
- fix typo in /etc/X11/xim.d/uim.
* Tue Feb 22 2005 mfabian@suse.de
- create start script /etc/X11/xim.d/uim and symlink in ja
subdirectory.
* Sat Jan 8 2005 mfabian@suse.de
- update to 0.4.5.20050108.165 (fixes crashes and moves the plugins
to the correct directory).
- add anthy, anthy-devel to "# neededforbuild". Previously anthy
was not needed at buildtime but now it is.
- remove dont-use-uim-default-by-default-for-all-languages.patch,
it's not necessary anymore and setting the wildcard for the
direct input method to the empty string instead of "*" makes
uim crash.
* Fri Jan 7 2005 mfabian@suse.de
- update to 0.4.5.20050107.
- remove uim-toolbar-gtk.patch (now included in tarball).
* Tue Jan 4 2005 mfabian@suse.de
- update prime.scm to prime_2004-12-13.scm.
* Wed Dec 22 2004 mfabian@suse.de
- apply uim-toolbar-gtk.patch received from
TOKUNAGA Hiroyuki <tkng@xem.jp> to make uim-toolbar-gtk work
with gtk+ >= 2.5.
* Fri Dec 17 2004 mfabian@suse.de
- fix version number in configure.ac.
* Wed Dec 15 2004 mfabian@suse.de
- update to 0.4.5svn1650.
dont-use-uim-default-by-default-for-all-languages.patch is
apparently not necessary anymore.
* Thu Sep 16 2004 ro@suse.de
- remove xfce from neededforbuild (unused anyway)
* Sat Sep 4 2004 mfabian@suse.de
- update to 0.4.3.
* Tue Aug 24 2004 mfabian@suse.de
- Bugzilla #44155: add /usr/bin/touch to PreReq:.
* Fri Aug 20 2004 mfabian@suse.de
- update to svn trunk (0.4.2.1.20040820) to fix the switching
between the romaji and kana input mode, see also:
http://freedesktop.org/pipermail/uim/2004-August/000603.html
* Fri Aug 13 2004 mfabian@suse.de
- update to 0.4.2.1
- add control-reaches-end-of-non-void-function.patch.
- move uim-helper-candwin-gtk, uim-helper-toolbar-gtk, and
uim-helper-applet to uim-applet sub-package.
* Tue Mar 16 2004 mfabian@suse.de
- update to 0.3.2.
* Tue Mar 16 2004 mfabian@suse.de
- make only uim-anthy a default gtk-input-module for Japanese.
- don't use the uim-default input module for any language by
default (This module was used for *all* languages by default,
that means even when running in de_DE.UTF-8 locale,
uim-helper-server would start, which is quite useless).
- add canna canna-devel canna-libs to # neededforbuild in order
to build the uim-canna module as well.
* Fri Mar 5 2004 mfabian@suse.de
- update to 0.3.1
- remove uim.patch and warnings.patch (included upstream).
* Thu Feb 26 2004 mfabian@suse.de
- new package, version 0.3.0.1.