File latencytop.spec of Package latencytop

# spec file for package latencytop (Version 0.5)
# Copyright (c) 2010 SUSE LINUX Products 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

# norootforbuild

Name:           latencytop
BuildRequires:  gtk2-devel ncurses-devel pkgconfig
License:        GPL-2.0
Group:          System/Monitoring
Summary:        Kernel latency measuring tool
Version:        0.5
Release:        3
Source:         latencytop-%{version}.tar.bz2
Patch:          latencytop-warning-fixes.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

LatencyTOP is a Linux* tool for software developers (both kernel and
userspace), aimed at identifying where in the system latency is
happening, and what kind of operation/action is causing the latency to
happen so that the code can be changed to avoid the worst latency
hiccups. A version with graphic interface is available as xlatencytop.

%setup -q
%patch -p1

make %{?jobs:-j %jobs}
mv latencytop xlatencytop
make clean
sed -i 's|HAS_GTK_GUI = 1|#HAS_GTK_GUI = 1|' Makefile
make %{?jobs:-j %jobs}

mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m 0755 xlatencytop $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
install -c -m 0644 *.8 $RPM_BUILD_ROOT%{_mandir}/man8

[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%defattr(-, root, root)
%doc %{_mandir}/man*/*

openSUSE Build Service is sponsored by