File fancontrol-gui.spec of Package fancontrol-gui
#
# spec file for package fancontrol-gui
#
# Copyright (c) 2020 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 _name org.kde.fancontrol.gui
Name: fancontrol-gui
Version: @SERVICE@
Release: 0
Summary: A GUI for Fancontrol
License: GPL-2.0-only
Group: Hardware/Other
URL: https://github.com/Maldela/fancontrol-gui
Source0: %{name}-%{version}.tar.xz
Source100: %{name}.rpmlintrc
BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: cmake(KF5Auth)
BuildRequires: cmake(KF5Config)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5DBusAddons)
BuildRequires: cmake(KF5Declarative)
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5KCMUtils)
BuildRequires: cmake(KF5Kirigami2)
BuildRequires: cmake(KF5Notifications)
BuildRequires: cmake(KF5Plasma)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Widgets)
Requires: sensors
Recommends: %{name}-lang = %{version}
%description
GUI for Fancontrol.
It uses the KAuth module of the KDE Frameworks 5 to write the generated config file.
Furthermore it communicates with systemd via dbus to control the fancontrol service.
If you want to compile without systemd support set the -DNO_SYSTEMD option.
%package kcm
Summary: A Fancontrol control module for KDE
Group: System/GUI/KDE
Requires: %{name} = %{version}
%description kcm
GUI for Fancontrol.
It uses the KAuth module of the KDE Frameworks 5 to write the generated config file.
Furthermore it communicates with systemd via dbus to control the fancontrol service.
If you want to compile without systemd support set the -DNO_SYSTEMD option.
%package plasmoid
Summary: Plasmoid to observe and control fan speeds
Group: System/GUI/KDE
Requires: %{name} = %{version}
%description plasmoid
This package provides a plasmoid to observe and control fan speeds.
%lang_package
%prep
%autosetup
%build
%cmake_kf5 -d build -- -DBUILD_KCM=on -DBUILD_PLASMOID=on
%make_build
%install
%kf5_makeinstall -C build
%suse_update_desktop_file -r -G "GUI for fancontrol" %{_name} Qt KDE System Monitor
%find_lang kcm_fancontrol %{name}-lang
chmod 644 %{buildroot}%{_kf5_servicesdir}/kcm_fancontrol.desktop
%files
%license LICENSE
%doc README.md
%{_kf5_bindir}/fancontrol_gui
%{_kf5_applicationsdir}/%{_name}.desktop
%{_kf5_iconsdir}/hicolor/scalable/apps/%{_name}.svg
%{_kf5_libdir}/libexec/kauth/fancontrol_gui-helper
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
%{_kf5_sharedir}/dbus-1/system.d/%{_name}.helper.conf
%else
%config %{_kf5_sysconfdir}/dbus-1/system.d/org.kde.fancontrol.gui.helper.conf
%endif
%{_kf5_sharedir}/dbus-1/system-services/%{_name}.helper.service
%{_kf5_sharedir}/polkit-1/actions/%{_name}.helper.policy
%dir %{_kf5_sharedir}/kpackage
%dir %{_kf5_sharedir}/kpackage/genericqml
%dir %{_kf5_sharedir}/kpackage/genericqml/%{_name}
%dir %{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents
%dir %{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/metadata.desktop
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui/Application.qml
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui/ConfigfileTab.qml
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui/SettingsTab.qml
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui/SensorsTab.qml
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/contents/ui/PwmFansTab.qml
%{_kf5_sharedir}/kpackage/genericqml/%{_name}/metadata.json
%dir %{_kf5_qmldir}/Fancontrol
%dir %{_kf5_qmldir}/Fancontrol/Qml
%{_kf5_qmldir}/Fancontrol/Qml/libfancontrol_qml_plugin.so
%{_kf5_qmldir}/Fancontrol/Qml/qmldir
%{_kf5_qmldir}/Fancontrol/Qml/ErrorDialog.qml
%{_kf5_qmldir}/Fancontrol/Qml/FanControls.qml
%{_kf5_qmldir}/Fancontrol/Qml/FanHeader.qml
%{_kf5_qmldir}/Fancontrol/Qml/FanItem.qml
%{_kf5_qmldir}/Fancontrol/Qml/ProfilesDialog.qml
%{_kf5_qmldir}/Fancontrol/Qml/PwmPoint.qml
%{_kf5_qmldir}/Fancontrol/Qml/SettingsForm.qml
%{_kf5_qmldir}/Fancontrol/Qml/StatusPoint.qml
%{_kf5_qmldir}/Fancontrol/Qml/colors.js
%{_kf5_qmldir}/Fancontrol/Qml/math.js
#%%{_kf5_qmldir}/Fancontrol/Qml/units.js
%{_kf5_appstreamdir}/%{_name}.appdata.xml
%files kcm
%dir %{_kf5_sharedir}/kpackage/kcms
%dir %{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm
%dir %{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm/contents
%dir %{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm/contents/ui
%{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm/contents/ui/KCM.qml
%{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm/metadata.desktop
%{_kf5_sharedir}/kpackage/kcms/org.kde.fancontrol.kcm/metadata.json
%{_kf5_servicesdir}/kcm_fancontrol.desktop
%dir %{_kf5_plugindir}/kcms
%{_kf5_plugindir}/kcms/kcm_fancontrol.so
%{_kf5_appstreamdir}/org.kde.fancontrol.kcm.appdata.xml
%files plasmoid
%dir %{_kf5_plasmadir}/plasmoids
%dir %{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid
%dir %{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents
%dir %{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/config
%dir %{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/ui
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/config/config.qml
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/config/main.xml
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/ui/configGeneral.qml
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/contents/ui/main.qml
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/metadata.desktop
%{_kf5_plasmadir}/plasmoids/org.kde.fancontrol.plasmoid/metadata.json
%{_kf5_appstreamdir}/org.kde.fancontrol.plasmoid.appdata.xml
%{_kf5_servicesdir}/plasma-applet-org.kde.fancontrol.plasmoid.desktop
%files lang -f %{name}-lang
%changelog