## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global __provides_exclude_from ^%{_libdir}/fcitx5/.*\\.so$

Name:           fcitx5-rime
Version:        5.1.9
Release:        %autorelease
Summary:        RIME support for Fcitx
# Automatically converted from old format: LGPLv2+ - review is highly recommended.
License:        LicenseRef-Callaway-LGPLv2+
URL:            https://github.com/fcitx/fcitx5-rime
Source:         https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}.tar.zst
Source1:        https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}.tar.zst.sig
Source2:        https://pgp.key-server.io/download/0x8E8B898CBF2412F9

BuildRequires:  gnupg2
BuildRequires:  brise 
BuildRequires:  cmake
BuildRequires:  extra-cmake-modules
BuildRequires:  gcc-c++
BuildRequires:  ninja-build
BuildRequires:  gettext
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Fcitx5Core)
BuildRequires:  pkgconfig(Fcitx5Module)
BuildRequires:  pkgconfig(rime)
BuildRequires:  /usr/bin/appstream-util
Requires:       hicolor-icon-theme
Requires:       fcitx5-data
Requires:       brise

%description
RIME(中州韻輸入法引擎) is mainly a Traditional Chinese 
input method engine.

%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup

%build
%cmake -GNinja
%cmake_build 

%install
%cmake_install

# convert symlinked icons to copied icons, this will help co-existing with
# fcitx4
for iconfile in $(find %{buildroot}%{_datadir}/icons -type l)
do
  origicon=$(readlink -f ${iconfile})
  rm -f ${iconfile}
  cp ${origicon} ${iconfile}
done
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
%find_lang %{name}

%check
%ctest

%files -f %{name}.lang
%license LICENSES/LGPL-2.1-or-later.txt
%doc README.md 
%{_libdir}/fcitx5/librime.so
%{_datadir}/fcitx5/*/rime.conf
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/rime-data/fcitx5.yaml
%{_metainfodir}/org.fcitx.Fcitx5.Addon.Rime.metainfo.xml

%changelog
## START: Generated by rpmautospec
* Thu Oct 10 2024 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.9-1
- update to upstream release 5.1.9

* Wed Aug 28 2024 Miroslav Suchý <msuchy@redhat.com> - 5.1.8-3
- convert license to SPDX

* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sat Jun 01 2024 Zephyr Lykos <git@mochaa.ws> - 5.1.8-1
- update to upstream release 5.1.8

* Sat Jun 01 2024 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.7-1
- update to upstream release 5.1.7

* Tue Apr 23 2024 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.6-1
- update to upstream release 5.1.6

* Fri Mar 01 2024 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.5-1
- update to upstream release 5.1.5

* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jan 05 2024 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.4-1
- update to upstream release 5.1.4

* Thu Nov 02 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.3-2
- update path for rime.so

* Thu Nov 02 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.3-1
- update to upstream release 5.1.3

* Mon Oct 02 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.2-1
- update to upstream release 5.1.2

* Sun Aug 20 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.1-1
- update to upstream release 5.1.1

* Fri Aug 18 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.1.0-1
- update to upstream release 5.1.0

* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Sun Mar 12 2023 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.16-1
- update to upstream release 5.0.16

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Mon Nov 21 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.15-1
- update to upstream release 5.0.15

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jul 04 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.14-1
- update to upstream release 5.0.14

* Mon May 23 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.13-1
- update to upstream release 5.0.13

* Thu Mar 10 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.12-1
- update to upstream release 5.0.12

* Wed Feb 02 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.11-1
- update to upstream release 5.0.11

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sun Jan 02 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.10-2
- Add %%{_datadir}/rime-data/fcitx5.yaml

* Sun Jan 02 2022 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.10-1
- update to 5.0.10

* Sun Dec 05 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.9-1
- update to 5.0.9

* Sat Nov 06 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.8-1
- update to 5.0.8

* Tue Oct 19 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.7-2
- rebuild for librime-1.7.2

* Sun Sep 26 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.7-1
- update to 5.0.7

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed May 05 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.6-1
- Update to 5.0.6 upstream release

* Mon Mar 22 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.5-1
- Update to 5.0.5 upstream release

* Sat Feb 20 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.4-1
- update to 5.0.4 upstream release

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Jan 13 11:12:05 CST 2021 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.3-1
- update to 5.0.3 upstream release

* Fri Dec 11 16:56:26 CST 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.2-2
- fix conlict with fcitx4

* Thu Dec 10 22:39:12 CST 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.2-1
- Update to 5.0.2 upstream release

* Sat Dec  5 16:29:01 CST 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.1-1
- Update to 5.0.1 upstream release

* Tue Nov  3 20:13:39 CST 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 5.0.0-1
- update to 5.0.0 upstream release

* Fri Oct 16 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 0-0.5
- update to e20996d752e3b2882d35c15630fa4b75da177485 upstream commit

* Sat Sep 12 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 0-0.4
- Rebuild for fcitx5
- Upstream commit 6da82ec569e3a83a94f7c1fff71fce885a6b2252

* Sat Aug 22 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 0-0.3.20200811gite4fc600
- add missing Requires

* Sun Aug 16 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 0-0.2.20200811gite4fc600
- rebuilt

* Wed Aug 12 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 0-0.1.20200811gite4fc600
- initial package

## END: Generated by rpmautospec