%global framework ki18n

Name:           kf5-%{framework}
Version:        5.113.0
Release:        1
Summary:        KDE Frameworks 5 Tier 1 addon for localization

License:        LGPLv2+ and BSD-3-Clause 
URL:            https://invent.kde.org/frameworks/%{framework}

%global majmin %majmin_ver_kf5
%global stable %stable_kf5

Source0:        http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz


# filter plugin provides
%global __provides_exclude_from ^(%{_kf5_plugindir}/.*\\.so)$

BuildRequires:  extra-cmake-modules >= %{majmin}
BuildRequires:  gettext
BuildRequires:  kf5-rpm-macros >= %{majmin}
BuildRequires:  perl-interpreter
BuildRequires:  python3
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtbase-private-devel
BuildRequires:  qt5-qtdeclarative-devel
BuildRequires:  qt5-qtscript-devel

Requires:       kf5-filesystem >= %{majmin}

%description
KDE Frameworks 5 Tier 1 addon for localization.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       gettext
Requires:       python3
%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

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

%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
   -DPYTHON_EXECUTABLE:PATH=%__python3
popd

%make_build -C %{_target_platform}

%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang %{name} --all-name

%ldconfig_scriptlets

%files -f %{name}.lang
%doc README.md
%license LICENSES/*.txt
%{_kf5_libdir}/libKF5I18n.so.*
%{_kf5_libdir}/libKF5I18nLocaleData.so.*
%{_kf5_datadir}/qlogging-categories5/*%{framework}*
%{_kf5_qmldir}/org/kde/i18n/localeData/
%{_kf5_qtplugindir}/kf5/ktranscript.so
%lang(ca) %{_datadir}/locale/ca/LC_SCRIPTS/ki18n5/
%lang(ca@valencia) %{_datadir}/locale/ca@valencia/LC_SCRIPTS/ki18n5/
%lang(fi) %{_datadir}/locale/fi/LC_SCRIPTS/ki18n5/
%lang(gd) %{_datadir}/locale/gd/LC_SCRIPTS/ki18n5/
%lang(ja) %{_datadir}/locale/ja/LC_SCRIPTS/ki18n5/
%lang(ko) %{_datadir}/locale/ko/LC_SCRIPTS/ki18n5/
%lang(nb) %{_datadir}/locale/nb/LC_SCRIPTS/ki18n5/
%lang(nn) %{_datadir}/locale/nn/LC_SCRIPTS/ki18n5/
%lang(ru) %{_datadir}/locale/ru/LC_SCRIPTS/ki18n5/
%lang(sr) %{_datadir}/locale/sr/LC_SCRIPTS/ki18n5/
%lang(sr@ijekavian) %{_datadir}/locale/sr@ijekavian/LC_SCRIPTS/ki18n5/
%lang(sr@ijekavianlatin) %{_datadir}/locale/sr@ijekavianlatin/LC_SCRIPTS/ki18n5/
%lang(sr@latin) %{_datadir}/locale/sr@latin/LC_SCRIPTS/ki18n5/
%lang(sr) %{_datadir}/locale/uk/LC_SCRIPTS/ki18n5/

%files devel
%{_kf5_includedir}/KI18n/
%{_kf5_includedir}/KI18nLocaleData/
%{_kf5_libdir}/libKF5I18n.so
%{_kf5_libdir}/libKF5I18nLocaleData.so
%{_kf5_libdir}/cmake/KF5I18n/
%{_kf5_archdatadir}/mkspecs/modules/qt_KI18n.pri


%changelog
* Tue Jan 02 2024 wangqia <wangqia@uniontech.com> - 5.113.0-1
- Update to upstream version 5.113.0

* Thu Aug 03 2023 wangqia <wangqia@uniontech.com> - 5.108.0-1
- Update to upstream version 5.108.0

* Fri Dec 09 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 5.100.0-1
- Update to upstream version 5.100.0

* Mon Sep 05 2022 liweiganga <liweiganga@uniontech.com> - 5.97.0-1
- update to upstream version 5.97.0

* Mon Jul 25 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 5.95.0-1
- update to upstream version 5.95.0

* Wed May 18 2022 tanyulong <tanyulong@kylinos.cn> - 5.90.0-2
- Improve the project according to the requirements of compliance improvement

* Sat Feb 12 2022 pei-jiankang <peijiankang@kylinos.cn> - 5.90.0-1
- update to upstream version 5.90.0

* Fri Jan 14 2022 pei-jiankang <peijiankang@kylinos.cn> - 5.88.0-1
- update to upstream version 5.88.0

* Sun Sep 27 2020 douyan <douyan@kylinos.cn> - 5.55.0-2
- use python3

* Thu Jul 23 2020 wangmian <wangmian@kylinos.cn> - 5.55.0-1
- Init kf5-ki18n project
