# The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define anthy_version 8622 %define m17n_lib_version 1.3.4 %define uim_major 8 %define libname_orig lib%{name} %define libname %mklibname %{name} %{uim_major} %define develname %mklibname %{name} -d %define custom_major 2 %define libcustom_orig libuim-custom %define libcustom %mklibname uim-custom %{custom_major} %define gcroots_major 0 %define libgcroots_orig libgcroots %define libgcroots %mklibname gcroots %{gcroots_major} %define scm_major 0 %define libscm %mklibname uim-scm %{scm_major} %global _legacy_common_support 1 # This should probably be changed, as GTK 2 is rarely used anymore. %global default_toolkit gtk Name: uim Summary: Multilingual input method library Version: 1.8.9 Release: %mkrel 3 Group: System/Internationalization # uim itself is licensed under BSD # scm/py.scm, helper/eggtrayicon.[ch], qt/pref-kseparator.{cpp,h} # and qt/chardict/chardict-kseparator.{cpp,h} is licensed under LGPLv2+ # pixmaps/*.{svg,png} is licensed under BSD or LGPLv2 License: BSD and LGPLv2+ and (BSD or LGPLv2) URL: https://github.com/uim/uim Source0: https://github.com/uim/uim/releases/download/%{version}/uim-%{version}.tar.bz2 Patch0: uim-qt5-fix.patch #Patch1: uim-harden.diff Patch2: uim-1.8.9-no-plasma5-applet.patch Patch3: uim-emacs-utf8.patch Patch4: uim-configure-c99.patch Patch5: uim-fix-emacs29.patch # Build system BuildRequires: autoconf BuildRequires: automake BuildRequires: ed BuildRequires: intltool BuildRequires: libtool # Basic input methods BuildRequires: m17n-db BuildRequires: m17n-lib-devel >= %{m17n_lib_version} BuildRequires: pkgconfig(anthy) >= %{anthy_version} # Console frontend (uim-fep) BuildRequires: pkgconfig(libedit) BuildRequires: pkgconfig(ncurses) # XIM frontend BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) # GTK 2 frontend BuildRequires: pkgconfig(gdk-x11-2.0) BuildRequires: pkgconfig(gtk+-2.0) >= 2.4.0 BuildRequires: pkgconfig(xext) # GTK 3 frontend BuildRequires: pkgconfig(gtk+-3.0) # Qt 5 frontend BuildRequires: cmake BuildRequires: (extra-cmake-modules or cmake(ECM) or cmake(ecm)) Buildrequires: cmake(KF5Plasma) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5X11Extras) BuildRequires: pkgconfig(libnotify) >= 0.4 BuildRequires: pkgconfig(libcurl) # Extras BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(libffi) BuildRequires: eb-devel Requires: %{libname} = %{version} Requires: uim-%{default_toolkit} Requires: anthy >= %{anthy_version} Requires: m17n-lib >= %{m17n_lib_version} Requires: skkdic Provides: uim-anthy, uim-m17nlib, uim-prime, uim-skk %description Uim is a multilingual input method library. Uim's project goal is to provide secure and useful input method for all languages. %package gtk Summary: GNOME helper for uim Group: System/Internationalization Requires: %{name} = %{version} Requires: gtk+2 Provides: uim-applet-gtk Provides: uim-applet = %{version} %description gtk GNOME helper for uim. It contains some apps like toolbar, system tray, applet, candidate window for Uim library. %package gtk3 Summary: GNOME3 helper for uim Group: System/Internationalization Requires: %{name} = %{version} Requires: gtk+3 Provides: uim-applet-gtk3 Provides: uim-applet = %{version} %description gtk3 GNOME3 helper for uim. It contains some apps like toolbar, system tray, applet, candidate window for Uim library. %package qt5 Summary: Qt5 helper for uim Group: System/Internationalization Requires: %{name} = %{version} Requires: qtbase5-common Provides: uim-qt5immodule = %{version}-%{release} Provides: uim-applet-plasma5 %description qt5 A plugin for using UIM on qt5-immodule and also provides the helper programs. %package base Summary: Misc files needed by UIM library Group: System/Internationalization %description base Misc files needed by UIM library. %package -n %{libname} Summary: UIM library Group: System/Internationalization Provides: %{libname_orig} = %{version}-%{release} Requires: uim-base %description -n %{libname} UIM library. %package -n %{develname} Summary: Headers of uim for development Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version}-%{release} Provides: %{libname_orig}-devel = %{version}-%{release} %description -n %{develname} Headers of %{name} for development. %package -n %{libcustom} Summary: Custom library for UIM Group: System/Internationalization Provides: %{libcustom_orig} = %{version}-%{release} %description -n %{libcustom} Custom library for UIM. %package -n %{libgcroots} Summary: Gcroots library for UIM Group: System/Internationalization Provides: %{libgcroots_orig} = %{version}-%{release} %description -n %{libgcroots} This library abstracts architecture-dependent parts of garbage collector roots acquisition such as register windows of SPARC and register stack backing store of IA-64. With this library, one can easily write one's own garbage collector with a small footprint, some application-specific optimizations, for just learning or testing experimental ideas. %package -n %{libscm} Summary: Scm library for UIM Group: System/Internationalization %description -n %{libscm} Scm library for UIM. %prep %autosetup -p1 %build %configure \ --disable-rpath \ --with-anthy \ --with-anthy-utf8 \ --with-curl \ --with-eb \ --with-eb-conf=%{_libdir}/eb.conf \ --with-expat \ --with-ffi \ --with-m17nlib \ --without-canna \ --without-prime \ --without-scim \ --without-qt4 \ --without-qt4-immodule \ --disable-kde4-applet \ --with-qt5 \ --with-qt5-immodule \ --enable-dict \ --enable-notify=stderr,libnotify \ --enable-pref \ --disable-gnome-applet \ --disable-gnome3-applet \ --disable-kde-applet \ --enable-default-toolkit=%{default_toolkit} \ --disable-warnings-into-error %make_build %install %make_install # remove unnecessary files find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.debug' -exec rm -f '{}' \; # remove docs for sigscheme (they should be installed by %%doc) rm -rf %{buildroot}%{_datadir}/doc/sigscheme %find_lang %{name} %files -f %{name}.lang %doc AUTHORS COPYING README %doc sigscheme/doc/* %{_bindir}/uim-el*-agent %{_bindir}/uim-fep* %{_bindir}/uim-help %{_bindir}/uim-module-manager %{_bindir}/uim-sh %{_bindir}/uim-xim %{_bindir}/uim-m17nlib-relink-icons %{_datadir}/applications/* %{_datadir}/emacs/site-lisp/uim-el/*.el %{_mandir}/man1/* %{_datadir}/uim %{_libdir}/uim/notify/ %files gtk %doc COPYING %{_bindir}/uim-input-pad-ja %{_bindir}/uim-dict-gtk %{_bindir}/uim-im-switcher-gtk %{_bindir}/uim-pref-gtk %{_bindir}/uim-toolbar-gtk %{_bindir}/uim-toolbar-gtk-systray %{_libexecdir}/uim-candwin-gtk %{_libexecdir}/uim-candwin-horizontal-gtk %{_libexecdir}/uim-candwin-tbl-gtk %{_libdir}/gtk-2.0/*/immodules/*.so %files gtk3 %{_bindir}/uim-dict-gtk3 %{_bindir}/uim-im-switcher-gtk3 %{_bindir}/uim-input-pad-ja-gtk3 %{_bindir}/uim-pref-gtk3 %{_bindir}/uim-toolbar-gtk3 %{_bindir}/uim-toolbar-gtk3-systray %{_libdir}/gtk-3.0/*/immodules/im-uim.so %{_libexecdir}/uim-candwin-gtk3 %{_libexecdir}/uim-candwin-tbl-gtk3 %{_libexecdir}/uim-candwin-horizontal-gtk3 %files qt5 %doc COPYING %{_bindir}/uim-chardict-qt5 %{_bindir}/uim-im-switcher-qt5 %{_bindir}/uim-pref-qt5 %{_bindir}/uim-toolbar-qt5 %{_libexecdir}/uim-candwin-qt5 %{_qt5_plugindir}/platforminputcontexts/*.so #{_qt5_qmldir}/com/github/uim/ #{_datadir}/kservices5/plasma-applet-com.github.uim.status.desktop #{_metainfodir}/com.github.uim.status.appdata.xml #{_datadir}/plasma/plasmoids/com.github.uim.status/ %files base %{_libexecdir}/uim-helper-server %{_libdir}/uim/plugin/ %{_datadir}/locale/*/LC_MESSAGES/uim.mo %files -n %{libname} %doc COPYING %{_libdir}/libuim.so.%{uim_major}{,.*} %files -n %{libgcroots} %doc COPYING %{_libdir}/libgcroots.so.%{gcroots_major}{,.*} %files -n %{libcustom} %doc COPYING %{_libdir}/libuim-custom.so.%{custom_major}{,.*} %files -n %{libscm} %doc COPYING %{_libdir}/libuim-scm.so.%{scm_major}{,.*} %files -n %{develname} %doc COPYING %{_includedir}/* %{_libdir}/lib*.* %{_libdir}/pkgconfig/*.pc