File lxqt-admin.spec of Package lxqt-admin

#
# spec file for package lxqt-admin
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           lxqt-admin
Version:        @SERVICE@
Release:        0
Summary:        Admin tools
License:        LGPL-2.1+
Group:          System/GUI/LXQt
Url:            https://github.com/lxde/lxqt-admin
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.0.2
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(lxqt)
Recommends:     %{name}-lang
Requires:       polkit
Requires:       system-tools-backends
Requires(post): desktop-file-utils
Requires(pre):  desktop-file-utils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Administration tools for lxqt

%prep
%setup -q
sed -i '/^Categories/s/\(LXQt\;\)/X-\1/' lxqt-admin-*/lxqt-admin-*.desktop.in
sed -i '/^OnlyShowIn/s/\(LXQt\)/X-\1/' lxqt-admin-*/lxqt-admin-*.desktop.in
sed -i 's/\(Icon=\).*/\1preferences-system-time/' lxqt-admin-time/lxqt-admin-time.desktop.in
sed -i 's/\(Icon=\).*/\1preferences-desktop-user/' lxqt-admin-user/lxqt-admin-user.desktop.in

%build
%cmake \
    -DPULL_TRANSLATIONS=OFF
make %{?_smp_mflags}

%install
%cmake_install

%post
%desktop_database_post

%postun
%desktop_database_postun

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

%changelog