File mingw64-qqc2-desktop-style.spec of Package mingw64-qqc2-desktop-style

#
# spec file for package mingw64-qqc2-desktop-style
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%define _tar_path 5.103
# Only needed for the package signature condition
%bcond_without lang
%define _name   qqc2-desktop-style
Name:           mingw64-%{_name}
Version:        5.103.0
Release:        0
Summary:        A Qt Quick Controls 2 Style for Desktop UIs
License:        GPL-2.0-or-later
Group:          Development/Libraries/KDE
URL:            https://www.kde.org
Source:         https://download.kde.org/stable/frameworks/%{_tar_path}/qqc2-desktop-style-%{version}.tar.xz
%if %{with lang}
Source1:        https://download.kde.org/stable/frameworks/%{_tar_path}/qqc2-desktop-style-%{version}.tar.xz.sig
Source2:        frameworks.keyring
%endif
BuildRequires:  mingw64-extra-cmake-modules >= 0.0.8
# For dir ownership
BuildRequires:  mingw64-kf5-filesystem
BuildRequires:  mingw64(cmake:KF5ConfigWidgets)
BuildRequires:  mingw64(cmake:KF5IconThemes)
BuildRequires:  mingw64(cmake:KF5Kirigami2)
BuildRequires:  mingw64(cmake:Qt5Core) >= 5.9.1
BuildRequires:  mingw64(cmake:Qt5Gui)
BuildRequires:  mingw64(cmake:Qt5Network)
BuildRequires:  mingw64(cmake:Qt5Quick)
BuildRequires:  mingw64(cmake:Qt5QuickControls2)
BuildRequires:  mingw64(cmake:Qt5Svg)
BuildRequires:  mingw64(cmake:Qt5Widgets)
# Make sure the required libqt5-qtquickcontrols2 package is usable
# See https://bugs.kde.org/413829#c3
%requires_eq    libqt5-qtquickcontrols2
# plasma5-workspace sets up the env variables so that this theme
# is picked by default. It still works fine without it (no requires),
# but looks better with it. By itself plasma5-workspace does not use
# it (yet), so only install it with libqt5-qtquickcontrols2.
Supplements:    packageand(plasma5-workspace:libqt5-qtquickcontrols2)
# For KUA users
Provides:       mingw64-plasma5-qqc2-style = %{version}
Obsoletes:      mingw64-plasma5-qqc2-style < %{version}
%_mingw64_package_header_debug
BuildArch:      noarch

%description
A Qt Quick Controls 2 style engine that uses the desktop style
to draw controls with QStyle.

%package devel
Summary:        Development Files for Qt Quick Controls 2 Desktop Style
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}
Requires:       mingw64-extra-cmake-modules

%description devel
This file contains cmake files to be used by projects that depend on
qqc2-desktop-style.
Usually not needed as it is only a runtime dependency.

%_mingw64_debug_package

%prep
%setup -q -n %{_name}-%{version}

%build
%_mingw64_cmake_kf5 -d build
%_mingw64_cmake_build

%install
%_mingw64_kf5_makeinstall -C build

%files
%license LICENSE*
%dir %{_mingw64_kf5_qmldir}/QtQuick
%dir %{_mingw64_kf5_qmldir}/QtQuick/Controls.2
%{_mingw64_kf5_qmldir}/QtQuick/Controls.2/org.kde.desktop/
%{_mingw64_kf5_qmldir}/org/kde/qqc2desktopstyle/
%exclude %{_mingw64_kf5_qmldir}/org/kde/*/*/*.debug
%dir %{_mingw64_kf5_plugindir}/kf5
%dir %{_mingw64_kf5_plugindir}/kf5/kirigami
%{_mingw64_kf5_plugindir}/kf5/kirigami/org.kde.desktop.dll

%files devel
%{_mingw64_kf5_libdir}/cmake/KF5QQC2DesktopStyle/
# Legacy alias with typo...
%{_mingw64_kf5_libdir}/cmake/KF5QQC2DeskopStyle/

%changelog
openSUSE Build Service is sponsored by