--- gmemusage-0.2.orig/Makefile +++ gmemusage-0.2/Makefile @@ -26,7 +26,7 @@ # You shouldn't need to modify anything below this line # OPTIONS = $(BELL_ON_UNKNOWN_KEYPRESS) $(USE_PASTELS) $(SAVE_XSERVER_MEMORY) -CFLAGS = $(OPTIM) -Wall $(OPTIONS) +CFLAGS = $(OPTIM) -Wall $(OPTIONS) -g LDFLAGS = $(OPTIM) LIBX11 = $(LIBX11DIR) -lX11 LIBS = $(LIBX11) --- gmemusage-0.2.orig/debian/changelog +++ gmemusage-0.2/debian/changelog @@ -0,0 +1,86 @@ +gmemusage (0.2-11) unstable; urgency=low + + * Adopt the package (Closes: #486759). + + Repackage from scratch using cdbs + debhelper 7. + * debian/control: + + Standards-Version: 3.8.0. + + Add Homepage field (http://oss.sgi.com/projects/gmemusage/). + The old URL 'http://reality.sgi.com/raju/software.html' is not + active anymore (Closes: #290787). + + debian/menu: Move to 'Applications/System/Monitoring' section. + * debian/watch: Add file. + * debian/copyright: Switch to machine-readable format. + + -- Uwe Hermann Fri, 28 Nov 2008 14:18:17 +0100 + +gmemusage (0.2-10) unstable; urgency=low + + * several patches from Justin Pryzby justinpryzby a-t sourceforge.net + - patch for 2.6 kernels (closes: #276990) + - fix size of kernel (was 1024 times too high) (closes: #255111, #275875) + * mention copyright owner of the xlockmore code in debian/copyright (closes: #290779) + + -- Adrian Bridgett Mon, 24 Jan 2005 20:08:35 +0000 + +gmemusage (0.2-9) unstable; urgency=low + + * rebuild to update usr-doc link (debhelper) + + -- Adrian Bridgett Sat, 31 May 2003 20:49:12 +0100 + +gmemusage (0.2-8) unstable; urgency=low + + * lintian fix (emacs settings in changelog) + * update build-depends + + -- Adrian Bridgett Thu, 11 Apr 2002 20:54:15 +0100 + +gmemusage (0.2-7) unstable; urgency=low + + * fix menu location (closes: #103411) + + -- Adrian Bridgett Sun, 22 Jul 2001 21:37:32 +0100 + +gmemusage (0.2-6) unstable; urgency=low + + * FHS compliance + * removed testmem.pl - dunno why it's shipped + + -- Adrian Bridgett Fri, 13 Oct 2000 11:10:53 +0100 + +gmemusage (0.2-5) unstable; urgency=low + + * fixed menu entry (removed icon="none" and moved from System->Apps/System) + + -- Adrian Bridgett Sat, 26 Dec 1998 16:34:20 +0000 + +gmemusage (0.2-4) unstable; urgency=low + + * fix (lack of) memory allocation, patch from Carl R. Witty (fixes 26472) + + -- Adrian Bridgett Mon, 7 Sep 1998 20:43:23 +0100 + +gmemusage (0.2-3) unstable; urgency=low + + * display hostname on titlebar (fixes 17303, part-of 23728) + + -- Adrian Bridgett Sun, 21 Jun 1998 13:42:41 +0100 + +gmemusage (0.2-2) unstable frozen; urgency=low + + * patch from upstream to fix -background + + -- Adrian Bridgett Sun, 22 Mar 1998 18:16:48 +0000 + +gmemusage (0.2-1) unstable; urgency=low + + * new upstream version + * fixes for lintian: removed du, made testmem.pl executable, removed du file + + -- Adrian Bridgett Thu, 15 Jan 1998 22:24:45 +0000 + +gmemusage (0.1-1) unstable; urgency=low + + * initial release. + + -- Adrian Bridgett Tue, 13 Jan 1998 22:19:48 +0000 --- gmemusage-0.2.orig/debian/compat +++ gmemusage-0.2/debian/compat @@ -0,0 +1 @@ +7 --- gmemusage-0.2.orig/debian/dirs +++ gmemusage-0.2/debian/dirs @@ -0,0 +1 @@ +usr/bin --- gmemusage-0.2.orig/debian/watch +++ gmemusage-0.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://oss.sgi.com/projects/gmemusage/download/gmemusage-(.*)\.tar\.gz --- gmemusage-0.2.orig/debian/menu +++ gmemusage-0.2/debian/menu @@ -0,0 +1,2 @@ +?package(gmemusage):needs="X11" section="Applications/System/Monitoring" \ + title="Gmemusage" command="/usr/bin/gmemusage" --- gmemusage-0.2.orig/debian/control +++ gmemusage-0.2/debian/control @@ -0,0 +1,19 @@ +Source: gmemusage +Section: utils +Priority: optional +Maintainer: Uwe Hermann +Build-Depends: cdbs, debhelper (>= 7), libx11-dev +Standards-Version: 3.8.0 +Homepage: http://oss.sgi.com/projects/gmemusage/ + +Package: gmemusage +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Displays a graph detailing memory usage of each process + Gmemusage is a graphical program modelled after the Silicon Graphics Inc. + program of the same name. Gmemusage displays a window with a stacked bar. + Areas on the bar correspond to individual processes running on the system + and are updated periodically. Multiple copies of the same program + (actually, programs with the same name) are merged into one area on the + stack. Sizes of areas in the stack correspond to resident sizes of the + processes. --- gmemusage-0.2.orig/debian/copyright +++ gmemusage-0.2/debian/copyright @@ -0,0 +1,54 @@ +This package was debianized by: + + Uwe Hermann on Fri, 28 Nov 2008 12:21:37 +0100 + + It was originally debianized by Adrian Bridgett + on Tue, 13 Jan 1998 22:19:48 +0000, who maintained it until version 0.2-10. + +It was downloaded from: + + http://oss.sgi.com/projects/gmemusage/ + +Upstream Authors: + + Raju Mathur + +------------------------------------------------------------------------------- + +Files: * +Copyright: © 1997, 1998 Raju Mathur +License: GPL + Note: It's not explicitly mentioned which version of the GPL applies. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +------------------------------------------------------------------------------- + +Files: resource.c +Copyright: © 1997, 1998 Raju Mathur + © 1991 Patrick J. Naughton +License: GPL + Code in resource.c "shamelessly stolen" from xlockmore/resource.c. + Further changes to that file were done by: + * 01-May-97: Matthew Rench + * 01-Apr-97: Tom Schmidt + * 3-Apr-96: Jouk Jansen + * 18-Mar-96: Ron Hitchens + * 6-Mar-96: Jouk Jansen + * 20-Dec-95: Ron Hitchens + * 02-Aug-95: Roland Bock + * 21-Feb-95: Heath A. Kehoe . + * 21-Dec-94: Patrick D Sullivan . + * 18-Dec-94: Bill Woodward . + * 20-Sep-94: Lorenzo Patocchi . + * 11-Jul-94: Greg Bowering + +------------------------------------------------------------------------------- + +Files: debian/* +Copyright: © 2008 Uwe Hermann +License: PD + The packaging done by Uwe Hermann is hereby + released as public domain. + --- gmemusage-0.2.orig/debian/docs +++ gmemusage-0.2/debian/docs @@ -0,0 +1,3 @@ +README +TODO +CREDITS --- gmemusage-0.2.orig/debian/gmemusage.install +++ gmemusage-0.2/debian/gmemusage.install @@ -0,0 +1 @@ +gmemusage usr/bin --- gmemusage-0.2.orig/debian/rules +++ gmemusage-0.2/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_INSTALL_MANPAGES_gmemusage := gmemusage.1 + --- gmemusage-0.2.orig/debian/patches/10_misc.patch +++ gmemusage-0.2/debian/patches/10_misc.patch @@ -0,0 +1,105 @@ +--- gmemusage-0.2.orig/gmemusage.c ++++ gmemusage-0.2/gmemusage.c +@@ -40,6 +40,9 @@ + + #define TOO_SMALL 0 + #define BIG_ENOUGH 1 ++ ++#define name_length 64 ++ + /* + * I hate these file-wide variables, but since draw_window is going to be + * called from a signal, we can't pass it any args. +@@ -108,9 +111,10 @@ + border_width = 4 , + display_width , + display_height ; +- char +- *window_name = "gmemusage" , +- *icon_name = "gmemusage" ; ++ char ++ window_name [name_length]; ++ char ++ * window_name_list [1]; + Pixmap + icon_pixmap ; + XSizeHints +@@ -141,6 +145,11 @@ + { + strcpy ( progname , argv [0] ) ; + } ++ ++ strcpy(window_name, "gmemusage: "); ++ gethostname (&window_name[11], name_length - 11); ++ window_name_list[0] = window_name; ++ + /* + * Allocate necessaru X structures for later use. Apparently this needs to + * be done before any other X stuff. +@@ -228,13 +237,14 @@ + size_hints -> flags = PPosition | PSize | PMinSize ; + size_hints -> min_width = default_width ; + size_hints -> min_height = default_height ; +- if ( XStringListToTextProperty (&window_name , 1 , &windowName ) == 0 ) ++ ++ if ( XStringListToTextProperty ( window_name_list , 1 , &windowName ) == 0 ) + { + fprintf ( stderr , "%s: struct allocation for windowName failed\n" , + progname ) ; + exit ( 1 ) ; + } +- if ( XStringListToTextProperty ( &icon_name , 1 , &iconName ) == 0 ) ++ if ( XStringListToTextProperty ( window_name_list , 1 , &iconName ) == 0 ) + { + fprintf ( stderr , "%s: struct allocation for iconName failed\n" , + progname ) ; +@@ -752,7 +762,7 @@ + valuemask |= GCPlaneMask; + values.plane_mask = AllPlanes; + blackGC = XCreateGC ( display , win , valuemask , &values ) ; +- XSetForeground ( display , blackGC , BlackPixel ( display , screen_num ) ) ; ++ XSetForeground ( display , blackGC , Background . pixel ) ; + return ; + } + #if 0 +--- gmemusage-0.2.orig/proc.c ++++ gmemusage-0.2/proc.c +@@ -23,6 +23,9 @@ + /* + * Set values for various memory usages + */ ++#define MemTotalLine "MemTotal:" ++#define MemFreeLine "MemFree:" ++#define BuffersLine "Buffers:" + static void + SetMemInfo ( void ) + { +@@ -63,12 +66,28 @@ + { + if ( !strncmp ( buf , MemLine , MemLineLen ) ) + { ++ /* Linux 2.4 (and earlier?) */ + /* Mem: total used free shared buffers cached */ + sscanf ( buf , "%*s %d %*d %d %*d %d" , &totalmem , &freemem , + &buffermem ) ; + break ; ++ ++ /* Linux 2.6 (and later?) */ ++ } else if (!strncmp(buf, MemTotalLine, strlen(MemTotalLine))) { ++ sscanf(buf, "%*s %d", &totalmem); ++ } else if (!strncmp(buf, MemFreeLine, strlen(MemFreeLine))) { ++ sscanf(buf, "%*s %d", &freemem); ++ } else if (!strncmp(buf, BuffersLine, strlen(BuffersLine))) { ++ sscanf(buf, "%*s %d", &buffermem); + } + } ++ ++ if (!totalmem) { ++ fprintf(stderr, "Fatal error reading /proc/meminfo\n"); ++ exit(1); ++ } ++ ++ sysmem /= 1024 ; + sysmem /= 1024 ; + totalmem /= 1024 ; + freemem /= 1024 ; --- gmemusage-0.2.orig/debian/patches/20_makefile.patch +++ gmemusage-0.2/debian/patches/20_makefile.patch @@ -0,0 +1,27 @@ +--- Makefile.orig 2008-11-28 18:37:30.000000000 +0100 ++++ Makefile 2008-11-28 18:38:01.000000000 +0100 +@@ -19,15 +19,12 @@ + # Change these variables as necessary + # + CC = gcc +-OPTIM = -O2 # change to -g for debugging + LIBX11DIR = -L /usr/X11R6/lib + PREFIX = /usr/local + # + # You shouldn't need to modify anything below this line + # + OPTIONS = $(BELL_ON_UNKNOWN_KEYPRESS) $(USE_PASTELS) $(SAVE_XSERVER_MEMORY) +-CFLAGS = $(OPTIM) -Wall $(OPTIONS) -g +-LDFLAGS = $(OPTIM) + LIBX11 = $(LIBX11DIR) -lX11 + LIBS = $(LIBX11) + BINDIR = $(PREFIX)/bin +@@ -50,7 +47,7 @@ + $(CC) $(LDFLAGS) -o $@ proctest.o hash.o + + proctest.o: proc.c common.h +- $(CC) $(CFLAGS) -DDEBUG -o proctest.o -c proc.c ++ $(CC) $(CFLAGS) $(OPTIONS) -DDEBUG -o proctest.o -c proc.c + + install: gmemusage + install -m 0755 -o bin -g bin gmemusage $(BINDIR)/gmemusage