%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define mod_path ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@
Name:       @PACKAGE_NAME@
Version:    @PACKAGE_VERSION@
Release:    1%{?dist}
Summary:    IBus Array 30 project
License:    GPLv2+
Group:      System Environment/Libraries
URL:        https://github.com/lexical/ibus-array
Source0:    https://github.com/lexical/ibus-array/archive/release-%{version}.tar.gz

BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  meson
BuildRequires:  ibus-devel
BuildRequires:  gettext-devel
BuildRequires:  opencc-devel
%if 0%{?suse_version}  || 0%{?sle_version} || 0%{?mandriva_version}
BuildRequires:  sqlite3-devel
%else
BuildRequires:  sqlite-devel >= 3.0
%endif

Requires:   ibus

%description
IBus Array 30 project.

%prep
%setup -q

%build
%meson
%meson_build

%install
%meson_install

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
# %dir %{python_sitearch}/ibus
# %{python_sitearch}/ibus/*
%{_datadir}/%{name}/
%{_datadir}/ibus/component/array.xml
%{_libexecdir}/ibus-engine-array
%{_libexecdir}/ibus-setup-array

%changelog
* Sun Apr 21 2024 Danilo Chang <ray2501@gmail.com> - 0.2.3
* Fri Jul 17 2020 Keng-Yu Lin <kengyu@debian.org> - 0.2.2
* Sat Apr 22 2009 Yu-Chun Wang <mainlander1122@gmail.com> - 0.0.1
- The first version.
