Name:           maliit-keyboard
Version:        2.2.0
Release:        1
Summary:        Maliit Keyboard 2

License:        LGPLv3 and BSD and CC-BY-3.0
URL:            https://maliit.github.io/
Source0:        https://github.com/maliit/keyboard/archive/refs/tags/keyboard-%{version}.tar.gz

Patch0:         fix_qml_typos.patch
Patch1:         0001-Enable-anthy-unicode-build.patch

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  maliit-framework-devel >= %{version}
BuildRequires:  glib2-devel
BuildRequires:  hunspell-devel
BuildRequires:  anthy-unicode-devel
BuildRequires:  libpinyin-devel
BuildRequires:  libchewing-devel
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtdeclarative-devel
BuildRequires:  qt5-qtmultimedia-devel
BuildRequires:  qt5-qtfeedback-devel


%description
Based on Ubuntu Keyboard. Ubuntu Keyboard was a QML and C++ based Keyboard
Plugin for Maliit, based on the Maliit Reference plugin, taking into account the
special UI/UX requests of Ubuntu Phone.


%prep
%autosetup -n keyboard-%{version} -p1


%build
%cmake -Denable-presage=OFF
%make_build

%install
make install/fast DESTDIR=%{buildroot}

rm -rf %{buildroot}%{_datadir}/doc/maliit-keyboard
%find_lang %{name}

%files -f %{name}.lang
%license COPYING.BSD COPYING.CC-BY COPYING
%doc README.md
%{_bindir}/maliit-keyboard
%dir %{_libdir}/maliit/
%{_libdir}/maliit/keyboard2/
%{_libdir}/maliit/plugins/
%dir %{_datadir}/maliit/
%{_datadir}/maliit/keyboard2/
%{_datadir}/glib-2.0/schemas/org.maliit.keyboard.maliit.gschema.xml
%{_datadir}/applications/com.github.maliit.keyboard.desktop
%{_metainfodir}/com.github.maliit.keyboard.metainfo.xml


%changelog
* Wed Jul 20 2022 misaka00251 <misaka00251@misakanet.cn> - 2.2.0-1
- Init package
