File watsup.spec of Package watsup

# vim: set sw=4 ts=4 et:
# norootforbuild

%if 0%{?suse_version} <= 1140
%define number  1.9
%define number  2.8
Name:           watsup
Version:        %{number}
Release:        1
Summary:        Lightweight System Resource and Process Monitor
Source:         watsup-%{version}.tar.bz2
Source1:        watsup.desktop
Patch1:         watsup-optflags.patch
Group:          System/Monitoring
License:        GPL-3.0
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
BuildRequires:  pkgconfig make gcc-c++ libstdc++-devel
%if 0%{suse_version} <=1140
BuildRequires:  gtk2-devel
BuildRequires:  gtk3-devel xdg-utils
BuildRequires:  update-desktop-files

Monitor system resources and the processes using those resources.

* Overhead is low, supporting a sample interval down to 0.1 seconds
* Overall system and top process resources are shown on one page
* CPU, memory, disk I/O, network I/O, and page faults are monitored
* Usage for N CPUs shown on a scale from zero to N x 100%
* The highest ranked processes fitting in the window are shown, with minimal
  jumping around between samples (easy to watch one or a few processes)
* Process rank is a weighted sum of CPU, hard page faults, and disk I/O over
  the last few samples (the weight of each sample declines over time)
* Filter processes by user, PID, executable
* Font can be made large or small (for display in monitor corner)
* Click on a process to kill the process (after confirmation)


%setup -q
%if 0%{suse_version} <=1140

%if 0%{suse_version} <=1140
%__make %{?jobs:-j%{jobs}} \
    PREFIX="%{_prefix}" \
    OPTFLAGS="%{optflags}" \
%__make %{?jobs:-j%{jobs}} \

%makeinstall PREFIX="%{_prefix}" DOCDIR="%{_docdir}/%{name}"
%if 0%{suse_version} <=1140
%__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%suse_update_desktop_file -r "%{name}" System Monitor

%{?buildroot:%__rm -rf "%{buildroot}"}

%doc %{_docdir}/%{name}
%if 0%{suse_version} >=1210