%define _disable_source_fetch 0
%define debug_package %{nil}

Name:           sonic-frameworks-io
Version:        6.24.0
Release:        1%{?dist}
Summary:        SonicDE I/O (fork of KIO)

License:        LGPL-2.0-or-later
URL:            https://github.com/Sonic-DE/sonic-frameworks-io
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires:  extra-cmake-modules
BuildRequires:  gcc-c++
BuildRequires:  kf6-rpm-macros
BuildRequires:  cmake
BuildRequires:  cmake(KF6Archive)
BuildRequires:  cmake(KF6Crash)
BuildRequires:  cmake(KF6Solid)
BuildRequires:  switcheroo-control
BuildRequires:  cmake(KF6ColorScheme)
BuildRequires:  cmake(KF6Config)
BuildRequires:  cmake(KF6CoreAddons)
BuildRequires:  cmake(KF6DBusAddons)
BuildRequires:  cmake(KF6DocTools)
BuildRequires:  cmake(KF6GuiAddons)
BuildRequires:  cmake(KF6I18n)
BuildRequires:  cmake(KF6Service)
BuildRequires:  qt6-qtbase-private-devel
BuildRequires:  cmake(KF6Bookmarks)
BuildRequires:  cmake(KF6Completion)
BuildRequires:  cmake(KF6ConfigWidgets)
BuildRequires:  cmake(KF6IconThemes)
BuildRequires:  cmake(KF6ItemViews)
BuildRequires:  cmake(KF6JobWidgets)
BuildRequires:  cmake(KF6WindowSystem) >= 6.24.0
BuildRequires:  cmake(KF6Notifications)
BuildRequires:  cmake(KF6Wallet)
BuildRequires:  cmake(KF6WidgetsAddons)
BuildRequires:  cmake(KF6XmlGui)

BuildRequires:  libacl-devel
BuildRequires:  pkgconfig(blkid)
BuildRequires:  pkgconfig(mount)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  zlib-devel
BuildRequires:  libxslt-devel
BuildRequires:  docbook-dtds
BuildRequires:  docbook-style-xsl

BuildRequires:  qt6-qtbase-devel
BuildRequires:  cmake(Qt6UiPlugin)
BuildRequires:  cmake(Qt6Qml)

BuildRequires:  cmake(KF6KDED)
BuildRequires:  cmake(Qt6Core5Compat)
Requires:       kf6-filesystem
Recommends:     switcheroo-control


Provides:       kf6-kio%{?_isa} >= %{version}
Provides:       kf6-kio >= %{version}
Obsoletes:      kf6-kio <= %{version}
Provides:       kf6-kio-core%{?_isa} >= %{version}
Provides:       kf6-kio-gui%{?_isa} >= %{version}
Provides:       kf6-kio-file-widgets%{?_isa} >= %{version}
Obsoletes:      kf6-kio-core <= %{version}
Obsoletes:      kf6-kio-gui <= %{version}
Obsoletes:      kf6-kio-file-widgets <= %{version}

%description
SonicDE I/O is a fork of KIO, providing information and network management
API in SonicDE.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name} = %{version}-%{release}
Requires:       kf6-kbookmarks-devel
Requires:       cmake(KF6Completion)
Requires:       cmake(KF6Config)
Requires:       cmake(KF6CoreAddons)
Requires:       cmake(KF6ItemViews)
Requires:       cmake(KF6JobWidgets)
Requires:       cmake(KF6Service)
Requires:       cmake(KF6Solid)
Requires:       cmake(KF6XmlGui)
Requires:       cmake(KF6WindowSystem)
Requires:       qt6-qtbase-devel

Provides:       kf6-kio-devel%{?_isa} >= %{version}
Provides:       kf6-kio-devel >= %{version}
Obsoletes:      kf6-kio-devel <= %{version}

%description    devel
Development files for %{name}.

%prep
%autosetup -p1

%build
%cmake_kf6
%cmake_build

%install
%cmake_install
%find_lang kio6 --all-name --with-qt || :

%files -f kio6.lang
%license LICENSES/*
%{_libdir}/libKF6KIOCore.so.*
%{_libdir}/libKF6KIOGui.so.*
%{_libdir}/libKF6KIOWidgets.so.*
%{_libdir}/libKF6KIOFileWidgets.so.*
%{_qt6_plugindir}/kf6/kio/
%{_libexecdir}/kf6/kioexec
%{_datadir}/qlogging-categories6/kio.categories
%{_datadir}/qlogging-categories6/kio.renamecategories

%files devel
%{_includedir}/KF6/KIO/
%{_libdir}/libKF6KIOCore.so
%{_libdir}/libKF6KIOGui.so
%{_libdir}/libKF6KIOWidgets.so
%{_libdir}/libKF6KIOFileWidgets.so
%{_libdir}/cmake/KF6KIO/

%changelog
* Tue Mar 24 2026 Anders da Silva Rytter Hansen <andersrh@users.noreply.github.com> - 6.24.0-1
- Initial release of sonic-frameworks-io for SonicDE
