%define _disable_source_fetch 0
%define debug_package %{nil}

Name:           sonic-libworkspace
Version:        6.4.5
Release:        1%{?dist}
Summary:        KWorkspace library for SonicDE

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

BuildRequires:  extra-cmake-modules
BuildRequires:  kf6-rpm-macros
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6DBus)
BuildRequires:  cmake(KF6CoreAddons)
BuildRequires:  cmake(KF6Config)
BuildRequires:  cmake(KF6I18n)
BuildRequires:  cmake(KF6WindowSystem)
BuildRequires:  cmake(KF6KIO)

# X11 Support
BuildRequires:  libX11-devel
BuildRequires:  libxcb-devel
BuildRequires:  libSM-devel
BuildRequires:  libICE-devel
BuildRequires:  libXext-devel
BuildRequires:  libXrender-devel
BuildRequires:  libXcursor-devel
BuildRequires:  xcb-util-devel

%description
Library for common workspace components in SonicDE.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
Development files for sonic-libworkspace.

%prep
%autosetup -p1

%build
%cmake_kf6
%cmake_build

%install
%cmake_install

%files
%license LICENSES/*
%{_libdir}/libSonicKWorkspace.so.*

%files devel
%{_includedir}/SonicKWorkspace/
%{_libdir}/libSonicKWorkspace.so
%{_libdir}/cmake/SonicKWorkspace/

%changelog
* Wed Mar 11 2026 Anders Rh <andersrh@example.com> - 6.2.0-1
- Initial release for SonicDE
