File mcontrolcenter.spec of Package mcontrolcenter

#
# spec file for package mcontrolcenter
#
# Copyright (c) 2022 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/
#

Name:           mcontrolcenter
Version:        0.4.1
Release:        0
Summary:        Application for changing the settings of MSI laptops
License:        GPL-3.0
Group:          System/Management
URL:            https://github.com/dmitry-s93/MControlCenter
Source0:        MControlCenter-%{version}.tar.gz
#Patch0:
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5Network)
Requires:       libQt5Widgets5

%description
An application that allows you to change the settings of MSI laptops running Linux

%prep
%autosetup -p1 -n MControlCenter-%{version}

%build
%cmake
%cmake_build

%install
install -Dpm0755 build/mcontrolcenter %{buildroot}%{_bindir}/mcontrolcenter
install -Dpm0755 build/helper/mcontrolcenter-helper %{buildroot}%{_libexecdir}/mcontrolcenter-helper
install -Dpm0644 src/helper/mcontrolcenter-helper.conf %{buildroot}/usr/share/dbus-1/system.d/mcontrolcenter-helper.conf
install -Dpm0644 src/helper/mcontrolcenter.helper.service %{buildroot}/usr/share/dbus-1/system-services/mcontrolcenter.helper.service
install -Dpm0644 resources/mcontrolcenter.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -Dpm0644 resources/mcontrolcenter.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dpm0644 resources/mcontrolcenter.appdata.xml %{buildroot}%{_datadir}/metainfo/mcontrolcenter.appdata.xml

%files
%license LICENSE
%doc README.md
%{_bindir}/mcontrolcenter
%{_libexecdir}/mcontrolcenter-helper
/usr/share/dbus-1/system.d/mcontrolcenter-helper.conf
/usr/share/dbus-1/system-services/mcontrolcenter.helper.service
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/mcontrolcenter.appdata.xml

%changelog
openSUSE Build Service is sponsored by