diff --git a/kasumi.spec b/kasumi.spec index 8737624..705a879 100644 --- a/kasumi.spec +++ b/kasumi.spec @@ -1,12 +1,18 @@ +%bcond_without unicode + Name: kasumi Version: 2.5 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv2+ URL: http://kasumi.sourceforge.jp/ -BuildRequires: gtk2-devel anthy-unicode-devel +BuildRequires: gtk2-devel anthy-devel BuildRequires: autoconf automake libtool BuildRequires: gcc-c++ +%if %{with unicode} +BuildRequires: anthy-unicode-devel +Requires: %{name}-common = %{version}-%{release} +%endif Source0: http://jaist.dl.sourceforge.jp/kasumi/41436/%{name}-%{version}.tar.gz Patch0: kasumi-853099-manpage.patch @@ -16,21 +22,53 @@ Summary: An anthy dictionary management tool Kasumi is a dictionary management tool for Anthy. +%if %{with unicode} +%package common +Summary: Anthy dictionary management common files between kasumi and kasumi-unicode +BuildArch: noarch + +%description common +This package contains common files for kasumi and kasumi-unicode. + + +%package unicode +Requires: %{name}-common = %{version}-%{release} +Summary: An anthy-unicode dictionary management tool + +%description unicode +Kasumi-unicode is a dictionary management tool for Anthy-unicode. +%endif + + %prep %autosetup -p1 -autoreconf -f -i %build -export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS -I%_includedir/anthy-unicode-1.0" -export LIBS="$RPM_LD_FLAGS -lanthy-unicode -lanthydic-unicode" +export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" +%if %{with unicode} +echo "# Building kasumi-unicode" +sed -e 's/AC_CHECK_LIB(anthydic,/AC_CHECK_LIB(anthydic-unicode,/' \ + -e 's/AC_CHECK_LIB(anthy,/AC_CHECK_LIB(anthy-unicode,/' \ + -i.orig configure.in +autoreconf -f -i +%configure +make %{?_smp_mflags} +mv kasumi kasumi-unicode +make clean +cp configure.in.orig configure.in +%endif + +autoreconf -f -i +echo "# Building kasumi" %configure -echo $LIBS -echo $CXXFLAGS make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +%if %{with unicode} +install -pm 755 kasumi-unicode $RPM_BUILD_ROOT%{_bindir}/kasumi-unicode +%endif # remove .desktop file so that kasumi is accessible from scim panel/ibus panel and it's not necessary for other users. rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop @@ -38,15 +76,34 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop %find_lang %{name} +%if %{with unicode} +%files +%{_bindir}/kasumi +%doc AUTHORS ChangeLog NEWS README +%license COPYING + +%files unicode +%{_bindir}/kasumi-unicode +%doc AUTHORS ChangeLog NEWS README +%license COPYING + +%files common -f %{name}.lang +%{_mandir}/man1/kasumi.1* +%{_datadir}/pixmaps/kasumi.png +%else %files -f %{name}.lang %{_bindir}/kasumi %{_mandir}/man1/kasumi.1* %{_datadir}/pixmaps/kasumi.png %doc AUTHORS ChangeLog NEWS README %license COPYING +%endif %changelog +* Thu Nov 12 2020 Takao Fujiwra - 2.5-30 +- Generate kasumi-unicode for anthy-unicode + * Thu Sep 03 2020 Takao Fujiwra - 2.5-29 - Replace anthy with anthy-unicode