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 http://bugs.opensuse.org/
#
# norootforbuild
Name: latencytop
BuildRequires: gtk2-devel ncurses-devel pkgconfig
License: GPLv2
Group: System/Monitoring
Summary: Kernel latency measuring tool
Version: 0.5
Release: 3
Source: latencytop-%{version}.tar.bz2
Patch: latencytop-warning-fixes.diff
Url: http://www.latencytop.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
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.
%prep
%setup -q
%patch -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
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}
%install
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
make DESTDIR=$RPM_BUILD_ROOT install
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
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc %{_mandir}/man*/*
%{_sbindir}/*
%{_datadir}/latencytop
%changelog