File qps.spec of Package qps

#
# spec file for package qps
#
# 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/
#


%define _qtver 5.10.0
Name:           qps
Version:        1.10.16
Release:        0
Summary:        Visual Process Manager
License:        GPL-2.0 and QPL-1.0
Group:          System/Monitoring
Url:            https://github.com/QtDesktop/qps
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.0.2
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  lxqt-build-tools
BuildRequires:  pkgconfig
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5DBus) >= %{_qtver}
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(lxqt)
BuildRequires:  pkgconfig(xrender)
Recommends:     %{name}.lang = %{version}-%{release}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Qps is a visual process manager, an X11 version of "top" or "ps" that
displays processes in a window and lets you sort and manipulate them. It
displays some general system information, and many details about current
processes.
Qps has been ported to Qt 5.

%lang_package

%prep
%setup -q
# unfinished ~329
rm -f ./src/translations/qps_ru_RU.ts

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install %{?_smp_mflags}
%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} System Monitor
%endif

%find_lang %{name} --with-qt

%if 0%{?suse_version} < 1500
%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun
%endif

%files
%defattr(-,root,root)
%doc COPYING README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/metainfo/org.lxqt.Qps.appdata.xml
%{_mandir}/man?/%{name}.?%{ext_man}

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/translations/
%{_datadir}/%{name}/translations/%{name}_arn.qm
%{_datadir}/%{name}/translations/%{name}_ast.qm

%changelog
openSUSE Build Service is sponsored by