From 30e5bf10a912226e1f593699a3e5ecbe1a7b491a Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Jan 26 2012 11:09:14 +0000 Subject: add latencytop-tui with no Gtk dependency (cherry picked from commit 771b50535b142f53ed6eb7642f6790a4abf43195) Conflicts: latencytop.spec --- diff --git a/latencytop-Makefile-default-to-no-gtk.patch b/latencytop-Makefile-default-to-no-gtk.patch new file mode 100644 index 0000000..e6cf61f --- /dev/null +++ b/latencytop-Makefile-default-to-no-gtk.patch @@ -0,0 +1,11 @@ +Index: latencytop-0.5/Makefile +=================================================================== +--- latencytop-0.5.orig/Makefile ++++ latencytop-0.5/Makefile +@@ -1,5 +1,5 @@ + # FIXME: Use autoconf ? +-HAS_GTK_GUI = 1 ++#HAS_GTK_GUI = 1 + + DESTDIR = + SBINDIR = /usr/sbin diff --git a/latencytop.spec b/latencytop.spec index c895361..e104838 100644 --- a/latencytop.spec +++ b/latencytop.spec @@ -1,51 +1,92 @@ Name: latencytop Version: 0.5 -Release: 4%{?dist} -Summary: System latency monitor +Release: 6%{?dist} +Summary: System latency monitor (with GUI) Group: Applications/System License: GPLv2 URL: http://www.latencytop.org/ Source0: http://www.latencytop.org/download/%{name}-%{version}.tar.gz Patch0: latencytop-Makefile-fixes.patch +Patch1: latencytop-Makefile-default-to-no-gtk.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel glib2-devel gtk2-devel pkgconfig +Requires: %{name}-common = %{version}-%{release} %description LatencyTOP is a 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. +changed to avoid the worst latency hiccups. +This package contains a build of LatencyTOP with GUI interface. For a build +without GUI install %{name}-tui instead. + +%package tui +Group: Applications/System +Summary: System latency monitor (text interface only) +Requires: %{name}-common = %{version}-%{release} + +%description tui +LatencyTOP is a 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. +This package contains a build of LatencyTOP without GUI support (and with few +dependencies). + +%package common +Group: Applications/System +Summary: System latency monitor (shared files for both GUI and TUI builds) + +%description common +LatencyTOP is a 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. +This package contains files needed by both the GUI and TUI builds of LatencyTOP. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build export CFLAGS="${CFLAGS:-%{optflags}}" +# make two builds, first without GUI, then with make %{?_smp_mflags} - +mv latencytop latencytop-tui +make clean +make %{?_smp_mflags} HAS_GTK_GUI=1 %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} - +install -m 0755 latencytop-tui %{buildroot}%{_sbindir}/ %clean rm -rf %{buildroot} - %files %defattr(-,root,root,-) -#%doc %{_sbindir}/latencytop + +%files tui +%{_sbindir}/latencytop-tui + +%files common +%defattr(-,root,root,-) %{_datadir}/%{name} %{_mandir}/man8/* %changelog +* Thu Jan 26 2012 Michal Schmidt - 0.5-6 +- Build both with and without GUI to allow the use on systems where Gtk + dependency is undesirable. The latencytop package is still the full-blown build. + latencytop-tui is the miminal build. latencytop-common has the shared files. + * Mon Feb 07 2011 Fedora Release Engineering - 0.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild