diff --git a/uim.spec b/uim.spec index f1ef326..edff2c3 100644 --- a/uim.spec +++ b/uim.spec @@ -1,9 +1,11 @@ %global inst_xinput %{_sbindir}/update-alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_sysconfdir}/X11/xinit/xinput.d/uim.conf 50 %global uninst_xinput %{_sbindir}/update-alternatives --remove xinputrc %{_sysconfdir}/X11/xinit/xinput.d/uim.conf +%bcond_with canna + Name: uim Version: 1.8.6 -Release: 17%{?dist} +Release: 18%{?dist} # 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+ @@ -14,7 +16,10 @@ URL: https://github.com/uim/uim/ BuildRequires: libXft-devel libX11-devel libXext-devel libXrender-devel libXau-devel libXdmcp-devel libXt-devel BuildRequires: libgcroots-devel BuildRequires: gtk2-devel gtk3-devel ncurses-devel -BuildRequires: anthy-devel Canna-devel eb-devel gettext desktop-file-utils +%if %{with canna} +BuildRequires: Canna-devel +%endif +BuildRequires: anthy-devel eb-devel gettext desktop-file-utils BuildRequires: qt-devel cmake BuildRequires: libedit-devel libcurl-devel sqlite-devel expat-devel BuildRequires: m17n-lib-devel m17n-db-devel @@ -90,6 +95,7 @@ Requires: uim = %{version}-%{release} Requires(post): gtk3 /usr/bin/uim-module-manager Requires(postun): gtk3 /usr/bin/uim-module-manager +%if %{with canna} %package canna Summary: Canna support for Uim Group: System Environment/Libraries @@ -97,6 +103,7 @@ Requires: Canna Requires: uim = %{version}-%{release} Requires(post): gtk3 /usr/bin/uim-module-manager Requires(postun): gtk3 /usr/bin/uim-module-manager +%endif # with canna %package skk Summary: SKK support for Uim @@ -169,8 +176,10 @@ This package provides the KDE applet. %description anthy This package provides support for Anthy, a Japanese input method. +%if %{with canna} %description canna This package provides support for Canna, a Japanese input method. +%endif %description skk This package provides support for SKK, a Japanese input method. @@ -187,7 +196,9 @@ autoconf %build %configure --with-x --with-xft \ +%if %{with canna} --with-canna \ +%endif --with-anthy --with-anthy-utf8 \ --with-m17nlib \ --with-eb --with-eb-conf=%{_libdir}/eb.conf \ @@ -283,6 +294,7 @@ if [ "$1" = "0" ]; then /usr/bin/uim-module-manager --path %{_localstatedir}/lib/uim --unregister anthy-utf8 > /dev/null 2>&1 || : fi +%if %{with canna} %post canna /usr/bin/uim-module-manager --path %{_localstatedir}/lib/uim --register canna > /dev/null 2>&1 || : @@ -290,6 +302,7 @@ fi if [ "$1" = "0" ]; then /usr/bin/uim-module-manager --path %{_localstatedir}/lib/uim --unregister canna > /dev/null 2>&1 || : fi +%endif %post skk /usr/bin/uim-module-manager --path %{_localstatedir}/lib/uim --register skk > /dev/null 2>&1 || : @@ -445,6 +458,7 @@ fi %{_datadir}/uim/pixmaps/anthy*.png %dir %{_datadir}/uim +%if %{with canna} %files canna %doc AUTHORS ChangeLog* NEWS README %license COPYING @@ -452,6 +466,7 @@ fi # BSD or LGPLv2 %{_datadir}/uim/pixmaps/canna.png %dir %{_datadir}/uim +%endif %files skk %doc AUTHORS ChangeLog* NEWS README @@ -474,6 +489,9 @@ fi %dir %{_datadir}/uim %changelog +* Tue Aug 28 2018 Akira TAGOH - 1.8.6-18 +- Make canna subpackage conditional. + * Tue Feb 27 2018 Akira TAGOH - 1.8.6-17 - Add BR: gcc gcc-c++ - Fix the buffer overflow. (#1549478)