Name:     plastikstyle
Version:  1.0.4

%global forgeurl https://github.com/MartinF99/PlastikStyle
%global tag %{version}
%global date 20240319
%forgemeta

Release:  3%{?dist}
License:  LGPLv2.1
Summary:  QStyle imitating KDE 3's Plastik

URL:      %{forgeurl}
Source:   %{forgesource}

BuildRequires: cmake

#Qt5
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Gui)
BuildRequires: qt5-rpm-macros

#Qt6
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Gui)
BuildRequires: qt6-rpm-macros

Requires:      %{name}-common
Requires:      (%{name}-qt5 if qt5-qtbase)
Requires:      (%{name}-qt6 if qt6-qtbase)

%description
Plastikstyle is a qstyle for both qt5 and qt6 imitating the look and feel from
KDE3's plastikstyle. This is QPlastiqueStyle forked from qtstyleplugins.

%files
#nothing

#-------------------------------------------------------------------------------

%package     common
Summary:     Common files for plastik widget style

%description common
%{summary}

%files       common
%license     LICENSE
%doc         README.md

#-------------------------------------------------------------------------------

%package qt5
Summary:        Plastik widget style for Qt 5
Requires:       %{name}-common

%description qt5
%{summary}

%files qt5
%{_qt5_plugindir}/styles/lib%{name}5.so

#-------------------------------------------------------------------------------

%package qt6
Summary:        Plastik widget style for Qt 6
Requires:       %{name}-common

%description qt6
%{summary}

%files qt6
%{_qt6_plugindir}/styles/lib%{name}6.so

#-------------------------------------------------------------------------------

%prep
%forgeautosetup

%build
%cmake -DENABLE_ALL=on
%cmake_build

%install
%cmake_install

%changelog
* Fri Nov 1 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.0.4-3
- Rebuild for Qt 6.8

* Wed Oct 16 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.0.4-2
- Fedora 41 Mass Rebuild

* Fri Apr 26 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.0.4-1
- Update to version 1.0.4

* Tue Feb 27 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.0.2-1
- Fedora 40 Mass Rebuild

* Wed Jul 26 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.0.2
- Update to version 1.0.2

* Thu Jun 15 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.0.1^git20230615
- Update to version 1.0.1

* Fri May 5 2023 Hazel Bunny <hazel_bunny@disroot.org> 0.0^git20230317
- Initial Package.