Rework packaging for consistency and add rich supplements for GNOME Shell

QGnomePlatform packaging had the Qt5 version without a suffix while the
Qt6 version had a suffix. This made the packaging a bit inconsistent.

Additionally, QGnomePlatform is useful when a Qt5/Qt6 application is
installed on a GNOME desktop, so let's declare the necessary rich
dependency to indicate as such.
This commit is contained in:
Neal Gompa 2022-03-05 11:45:53 -05:00
parent 1c1c0062bc
commit 2c6b76583c

View File

@ -1,7 +1,7 @@
Name: qgnomeplatform
Version: 0.8.4
Release: 4%{?dist}
Summary: Qt5 Platform Theme aimed to accommodate Gnome settings
Release: 5%{?dist}
Summary: Qt Platform Theme aimed to accommodate Gnome settings
License: LGPLv2+
URL: https://github.com/MartinBriza/QGnomePlatform
@ -18,38 +18,59 @@ BuildRequires: gtk3-devel
BuildRequires: gsettings-desktop-schemas-devel
BuildRequires: libinput-devel
BuildRequires: libXrender-devel
%description
QGnomePlatform is a Qt Platform Theme aimed to accommodate as much of
GNOME settings as possibleand utilize them in Qt applications without
modifying them - making them fit into the environment as well as possible.
%package qt5
Summary: Qt5 Platform Theme aimed to accommodate Gnome settings
BuildRequires: qt5-qtbase-devel >= 5.15.2
BuildRequires: qt5-qtbase-static >= 5.15.2
BuildRequires: qt5-qtwayland-devel >= 5.15.2
BuildRequires: qt5-qtbase-private-devel >= 5.15.2
BuildRequires: libadwaita-qt5-devel >= 1.4.1
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
Requires: adwaita-qt5%{?_isa}
%if (0%{?fedora} && 0%{?fedora} <= 38)
# Replace QGnomePlatform package with this as it was the Qt5 flavor
Obsoletes: %{name} < 0.8.4-5
Provides: %{name} = %{version}-%{release}
Provides: %{name}%{?_isa} = %{version}-%{release}
%endif
# When GNOME Shell and Qt 5 are installed, we want this by default
Supplements: (qt5-qtbase and gnome-shell)
%description qt5
QGnomePlatform is a Qt5 Platform Theme aimed to accommodate as much of
GNOME settings as possibleand utilize them in Qt applications without
modifying them - making them fit into the environment as well as possible.
%package qt6
Summary: Qt6 Platform Theme aimed to accommodate Gnome settings
BuildRequires: qt6-qtbase-devel >= 6.2.0
BuildRequires: qt6-qtbase-static >= 6.2.0
BuildRequires: qt6-qtwayland-devel >= 6.2.0
BuildRequires: qt6-qtbase-private-devel >= 6.2.0
BuildRequires: libadwaita-qt5-devel >= 1.4.1
Requires: adwaita-qt5%{?_isa}
BuildRequires: libadwaita-qt6-devel >= 1.4.1
BuildRequires: qt5-qtbase-private-devel
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
%description
QGnomePlatform is a Qt5 Platform Theme aimed to accommodate as much of
GNOME settings as possibleand utilize them in Qt applications without
modifying them - making them fit into the environment as well as possible.
%package -n qgnomeplatform-qt6
Summary: Qt6 Platform Theme aimed to accommodate Gnome settings
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
Requires: adwaita-qt6%{?_isa}
%description -n qgnomeplatform-qt6
# When GNOME Shell and Qt 6 are installed, we want this by default
Supplements: (qt6-qtbase and gnome-shell)
%description qt6
QGnomePlatform is a Qt6 Platform Theme aimed to accommodate as much of
GNOME settings as possibleand utilize them in Qt applications without
modifying them - making them fit into the environment as well as possible.
%prep
%autosetup -p1 -n QGnomePlatform-%{version}
@ -69,19 +90,25 @@ modifying them - making them fit into the environment as well as possible.
%global _vpath_builddir %{_target_platform}-qt6
%cmake_install
%files
%files qt5
%doc README.md
%license LICENSE
%{_qt5_libdir}/libqgnomeplatform.so
%{_qt5_plugindir}/platformthemes/libqgnomeplatformtheme.so
%{_qt5_plugindir}/wayland-decoration-client/libqgnomeplatformdecoration.so
%files -n qgnomeplatform-qt6
%files qt6
%doc README.md
%license LICENSE
%{_qt6_libdir}/libqgnomeplatform6.so
%{_qt6_plugindir}/platformthemes/libqgnomeplatformtheme.so
%{_qt6_plugindir}/wayland-decoration-client/libqgnomeplatformdecoration.so
%changelog
* Sat Mar 05 2022 Neal Gompa <ngompa@fedoraproject.org> - 0.8.4-5
- Rework packaging for consistency
- Add rich supplements for installing QGnomePlatform modules
* Mon Feb 07 2022 Jan Grulich <jgrulich@redhat.com> - 0.8.4-4
- Rebuild (qt6)