File lxqt-admin.spec of Package lxqt-admin

#
# spec file for package lxqt-admin
#
# Copyright (c) 2018 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-or-later
Group:          System/GUI/LXQt
Url:            https://github.com/lxqt/lxqt-admin
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.1.0
BuildRequires:  lxqt-build-tools-devel >= 0.6.0
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(lxqt)
BuildRequires:  pkgconfig(polkit-qt5-1)
#Requires:       polkit
Requires:       system-tools-backends
Requires(post): desktop-file-utils
Requires(pre):  desktop-file-utils
Recommends:     %{name}-lang
%if 0%{?suse_version} == 1315
BuildRequires:  gcc5-c++
%else
BuildRequires:  gcc-c++ >= 4.9.0
%endif

%description
Administration tools for LXQt

%lang_package

%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 \
%if 0%{?suse_version} == 1315
    -DCMAKE_CXX_COMPILER=%{_bindir}/g++-5 \
%endif
    -DPULL_TRANSLATIONS=OFF
make %{?_smp_mflags}

%install
%cmake_install

%find_lang lxqt-admin-time lxqt-admin-user --with-qt

%files
%license COPYING
%doc AUTHORS 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

%files -n lxqt-admin-lang
%dir %{_datadir}/lxqt
%dir %{_datadir}/lxqt/translations
%{_datadir}/lxqt/translations/lxqt-admin-time
%{_datadir}/lxqt/translations/lxqt-admin-user

%changelog