File lxqt-admin.spec of Package lxqt-admin

#
# spec file for package lxqt-admin
#
# Copyright (c) 2024 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:           lxqt-admin
Version:        2.3.0
Release:        0
Summary:        LXQt system administration tool
License:        LGPL-2.1-or-later
URL:            https://github.com/lxqt/lxqt-admin
Source0:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc
Source2:        %{name}.keyring
Source3:        %{name}.rpmlintrc
BuildRequires:  cmake >= 3.5.0
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF6WindowSystem)
BuildRequires:  cmake(PolkitQt6-1)
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  cmake(lxqt2-build-tools)
BuildRequires:  pkgconfig(lxqt) >= 2.1.0
Requires:       polkit
Requires(post): desktop-file-utils
Requires(pre):  desktop-file-utils
Recommends:     %{name}-lang = %{version}-%{release}

%description
Administration tools for LXQt. Adjusts the time and date. Management of
users and groups.

%lang_package

%prep
%autosetup
sed -i '/^Categories/s/\(LXQt\;\)/X-\1/' %{name}-*/%{name}-*.desktop.in
sed -i '/^OnlyShowIn/s/\(LXQt\)/X-\1/' %{name}-*/%{name}-*.desktop.in
sed -i 's/\(Icon=\).*/\1preferences-system-time/' %{name}-time/%{name}-time.desktop.in
sed -i 's/\(Icon=\).*/\1preferences-desktop-user/' %{name}-user/%{name}-user.desktop.in

%build
%cmake_qt6 \
    -DUPDATE_TRANSLATIONS=ON
%{qt6_build}

%install
%{qt6_install}

%find_lang %{name} --with-qt --all-name

%files
%license COPYING
%doc AUTHORS README.md
%{_bindir}/%{name}-user
%{_bindir}/%{name}-user-helper
%{_bindir}/%{name}-time
%{_bindir}/%{name}-time-helper
%{_datadir}/applications/%{name}*.desktop
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%{_datadir}/polkit-1/actions/org.lxqt.%{name}-user.policy
%{_datadir}/polkit-1/actions/org.lxqt.%{name}-time.policy

%files lang -f %{name}.lang
%dir %{_datadir}/lxqt
%dir %{_datadir}/lxqt/translations
%dir %{_datadir}/lxqt/translations/%{name}-time
%dir %{_datadir}/lxqt/translations/%{name}-user

%changelog
openSUSE Build Service is sponsored by