File oxygen5.spec of Package oxygen5

# spec file for package oxygen5
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%bcond_without lang
%define kwin_deco 1

Name:           oxygen5
Version:        5.22.3
Release:        0
# Full Plasma 5 version (e.g. 5.8.95)
%{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}}
# Latest ABI-stable Plasma (e.g. 5.8 in KF5, but 5.8.95 in KUF)
%{!?_plasma5_version: %define _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')}
Summary:        Oxygen style, KWin decoration, cursors and sounds
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
%if %{with lang}
Source2:        plasma.keyring
Source3:        baselibs.conf
BuildRequires:  extra-cmake-modules >= 0.0.9
BuildRequires:  kf5-filesystem
BuildRequires:  cmake(KF5Completion)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5ConfigWidgets)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5FrameworkIntegration)
BuildRequires:  cmake(KF5GuiAddons)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5KCMUtils)
BuildRequires:  cmake(KF5Service)
BuildRequires:  cmake(KF5Wayland)
BuildRequires:  cmake(KF5WidgetsAddons)
BuildRequires:  cmake(KF5WindowSystem)
%if %kwin_deco
BuildRequires:  cmake(KDecoration2) >= %{_plasma5_version}
BuildRequires:  xz
BuildRequires:  cmake(Qt5DBus) >= 5.4.0
BuildRequires:  cmake(Qt5Quick) >= 5.4.0
BuildRequires:  cmake(Qt5Widgets) >= 5.4.0
BuildRequires:  cmake(Qt5X11Extras) >= 5.4.0
BuildRequires:  pkgconfig(xcb)
%if %kwin_deco
Requires:       oxygen5-decoration
Obsoletes:      oxygen5-decoration
Requires:       oxygen5-style
Recommends:     %{name}-lang
Recommends:     oxygen-cursors
Recommends:     oxygen5-sounds

Provides Oxygen style, KWin decoration, cursors and sounds.

%package sounds
Summary:        The KDE Plasma Workspace Sounds
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
Obsoletes:      oxygen-sounds5 < %{version}
Provides:       oxygen-sounds5 = %{version}
BuildArch:      noarch

%description sounds
This package contains the default sound set for a KDE Plasma workspace.

%package cursors
Summary:        The KDE Plasma Workspace Cursors
License:        GPL-3.0-or-later
Group:          System/GUI/KDE
Provides:       oxygen-cursors = %{version}
%if 0%{?suse_version} > 1314 && "%{suse_version}" != "1320"
Obsoletes:      oxygen4-cursors < %{version}
Provides:       oxygen4-cursors = %{version}
Obsoletes:      oxygen-cursors4 < %{version}
Provides:       oxygen-cursors4 = %{version}
Conflicts:      oxygen-cursors4
Conflicts:      oxygen4-cursors
Obsoletes:      oxygen-cursors5 < %{version}
Provides:       oxygen-cursors5 = %{version}
BuildArch:      noarch

%description cursors
This package contains the Oxygen cursor set.

%package style
Summary:        Oxygen style
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
Obsoletes:      oxygen-style5 < %{version}
Provides:       oxygen-style5 = %{version}
# Color schemes were moved here
Conflicts:      plasma5-desktop < 5.16.90

%description style
This package contains the libraries of the Oxygen style.

%if %kwin_deco
%package decoration
Summary:        Oxygen's KWin decoration
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
Supplements:    packageand(oxygen5-style:kwin5)
Obsoletes:      oxygen-decoration5 < %{version}
Provides:       oxygen-decoration5 = %{version}
%requires_eq oxygen5-style

%description decoration
This package contains the libraries Oxygen's KWin decoration.


%setup -q -n oxygen-%{version}

%cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}

  %kf5_makeinstall -C build
%if %{with lang}

%post     style -p /sbin/ldconfig

%postun   style -p /sbin/ldconfig

%if %kwin_deco
%post     decoration   -p /sbin/ldconfig

%postun   decoration   -p /sbin/ldconfig

%license COPYING*

%files style
%license COPYING*
%dir %{_kf5_sharedir}/color-schemes/
%dir %{_kf5_servicesdir}
%dir %{_kf5_iconsdir}/hicolor/*/
%dir %{_kf5_iconsdir}/hicolor/*/apps

%if %kwin_deco
%files decoration
%license COPYING*
%dir %{_kf5_servicesdir}

%files sounds
%license COPYING*

%files cursors
%license COPYING*

%if %{with lang}
%files lang -f %{name}.lang

openSUSE Build Service is sponsored by