File pwatch.spec of Package pwatch
# vim: set sw=4 ts=4 et:
# norootforbuild
Name: pwatch
Version: 0.0.5
Release: 0
Summary: I/O Process Monitor
Source: http://kernel.embedromix.ro/us/pwatch/pwatch-%{version}.tar.gz
Source1: io.desktop
Patch1: pwatch-makefile.patch
URL: http://kernel.embedromix.ro/us/
Group: System/Monitoring
License: GNU General Public License version 2 or later (GPL v2 or later)
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: ncurses-devel
BuildRequires: gcc make glibc-devel
BuildRequires: update-desktop-files
%description
pwatch is a set of tools to analyze what a process is doing.
Right now only 'io' (ex iotop) command is implemented.
It presents the I/O activity in a nice ncurses screen and you have the
possibility to sort by read/write speed ore amount of readed/written bytes from
the start of the program.
It was written to easly detect which program is eating a lot of I/O bandwidth.
%prep
%setup -q
%patch1
# the GCC -Wextra option is only supported with GCC on openSUSE >= 11.0:
%if 0%{?suse_version} < 1100
%__sed -i 's/-Wextra//g' Makefile.in
%endif
%build
# not autotools
./configure
%__make %{?jobs:-j%{jobs}} \
OPTFLAGS="%{optflags}" \
CC="%__cc"
%install
%makeinstall
%__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/io.desktop"
%suse_update_desktop_file -r io System Monitor
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changelog README TODO
%{_bindir}/io
%{_datadir}/applications/io.desktop