%undefine __cmake_in_source_build
%global framework kimageformats

Name:           kf5-%{framework}
Version:        5.108.0
Release:        1
Summary:        KDE Frameworks 5 Tier 1 addon with additional image plugins for QtGui

License:        LGPLv2+
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

%global __provides_exclude_from ^(%{_kf5_plugindir}/.*\\.so)$

BuildRequires:  extra-cmake-modules >= %{majmin}
# No jasper & openjpeg on openEuler
BuildRequires:  openjpeg2-devel
BuildRequires:  kf5-rpm-macros >= %{majmin}
BuildRequires:  LibRaw-devel

# We don't support this yet
#BuildRequires:  pkgconfig(libavif)
BuildRequires:  pkgconfig(OpenEXR)
BuildRequires:  cmake(KF5Archive)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  qt5-qtbase-devel

Requires:       kf5-filesystem >= %{majmin}

%description
This framework provides additional image format plugins for QtGui.  As
such it is not required for the compilation of any other software, but
may be a runtime requirement for Qt-based software to support certain
image formats.


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


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} ..
popd
%make_build  -C %{_target_platform}


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


%ldconfig_scriptlets

%files
%doc README.md
%license LICENSES/*.txt
%{_kf5_qtplugindir}/imageformats/*.so
%dir %{_kf5_datadir}/kservices5/qimageioplugins/
%{_kf5_datadir}/kservices5/qimageioplugins/*.desktop


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

* Fri Apr 28 2023 peijiankang <peijiankang@kylinos.cn> - 5.100.0-1
- Update version to 5.100.0

* Thu Jul 14 2022 misaka00251 <misaka00251@misakanet.cn> - 5.97.0-1
- Init package
