6 Commits

Author SHA1 Message Date
bch
06227deb08 Summary: minor update 2017-03-15 20:26:11 +00:00
bch
53ca874f25 Summary: improved installation, make dist target 2017-03-15 20:26:03 +00:00
bch
fbedd2a351 install copyright file 2017-02-26 18:53:55 +00:00
bch
fb1974ef9b Summary: some copyright things added/changed 2017-02-26 18:47:28 +00:00
bch
00ce2bed2a wrong filename 2017-02-26 17:22:13 +00:00
bch
a1d643c4ca Summary: remove object file 2017-02-26 16:07:03 +00:00
5 changed files with 75 additions and 27 deletions

View File

@@ -1,28 +1,38 @@
CFLAGS += -Wall -I/usr/X11R6/include/
BINDIR=/usr/local/bin
MANDIR=/usr/local/man/man1
LDFLAGS=-L/usr/X11R6/lib -lX11 -lXt -lXaw -lXmu
PROG= xmem
VERSION= 1.26
LDFLAGS+= -L/usr/X11R6/lib -lX11 -lXt -lXaw -lXmu
CFLAGS+= -Wall -I/usr/X11R6/include/
OBJECTS= xmem.o get_mem.o MemStripChart.o
xmem: xmem.o get_mem.o MemStripChart.o
$(CC) -o xmem xmem.o get_mem.o MemStripChart.o $(LDFLAGS)
xmem: $(OBJECTS)
$(CC) -o xmem $(OBJECTS) $(LDFLAGS)
xmem.o: xmem.c
$(CC) $(CFLAGS) -c xmem.c
%.o: %c
$(CC) $(CFLAGS) -c $<
get_mem.o: get_mem.c
$(CC) $(CFLAGS) -c get_mem.c
clean:
-rm -rf $(OBJECTS) $(PROG)
MemStripChart.o: MemStripChart.c
$(CC) $(CFLAGS) -c MemStripChart.c
dist:
mkdir -p ${PROG}-${VERSION}
cp *.h *.c Makefile xmem.1 xmem.bit copyright XMem.ad ${PROG}-${VERSION}
tar cfvz ${PROG}-${VERSION}.tar.gz ${PROG}-${VERSION}
rm -rf ${PROG}-${VERSION}
clean:
-rm xmem *.o *~
dist-clean:
-rm ${PROG}-${VERSION}.tar.gz
install:
install -d -m 755 {PREFIX}/bin/
install -c -S -s -o root -g bin -m 755 xmem ${PREFIX}/bin/xmem
install -d -m 755 ${PREFIX}/man/man1/
install -c -o root -g bin -m 644 xmem.1 ${PREFIX}/man/man1/xmem.1
install -d -m 755 ${PREFIX}/lib/X11/app-defaults/
install -c -o root -g bin -m 644 XMem.ad ${PREFIX}/lib/X11/app-defaults/XMem
install -d -m 755 ${PREFIX}/share/${PROG}/
install -c -o root -g bin -m 644 xmem.bit ${PREFIX}/share/${PROG}/xmem.bit
install -c -o root -g bin -m 644 copyright ${PREFIX}/share/${PROG}/copyright
all: xmem
install: all
/usr/bin/install -c -m 0555 xmem $(DESTDIR)$(BINDIR)
/usr/bin/install -c -m 0444 xmem.1 $(DESTDIR)$(MANDIR)
/usr/bin/install -c -m 0644 XMem.ad $(DESTDIR)/usr/local/lib/X11/app-defaults/XMem
/usr/bin/install -d -m 0755 $(DESTDIR)/usr/local/share/xmem/
/usr/bin/install -c -m 0644 xmem.bit $(DESTDIR)/usr/local/share/xmem/
.include <bsd.prog.mk>

Binary file not shown.

37
copyright Normal file
View File

@@ -0,0 +1,37 @@
This package was debianized by Daniel Baumann <daniel@debian.org> on
Sun, 22 Jan 2006 14:26:00 +0100.
This xmem was resurrected from the xfree86 sources of the bo release.
Copyright Holder: X Consortium
License:
Copyright (C) 1987 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization from
the X Consortium.
The Debian packaging is (C) 2006-2007, Daniel Baumann <daniel@debian.org> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

12
xmem.1
View File

@@ -1,4 +1,4 @@
.TH XMEM 1x "Release 5, X Version 11" "memory display utility"
.TH XMEM 1 "Release 5, X Version 11" "memory display utility"
.SH NAME
xmem \- memory/swap usage display utility for X
.SH SYNOPSIS
@@ -55,15 +55,15 @@ second. The default is 10.
(Xresource: *mem.update)
.TP
.B \-codecolor color
Color for used code and stack memory. The default is red.
Color for used code and stack memory. The default is blue.
(Xresource: *mem.codecolor)
.TP
.B \-cachedcolor color
Color for cached memory. The default is yellow.
Color for cached memory. The default is orange.
(Xresource: *mem.cachedcolor)
.TP
.B \-buffercolor color
Color for buffer memory. The default is blue.
Color for buffer memory. See BUGS.
(Xresource: *mem.buffercolor)
.TP
.B \-freecolor color
@@ -109,7 +109,7 @@ stored in the RESOURCE_MANAGER property.
.SH SEE ALSO
X(1), xrdb(1), mem(4), Athena StripChart Widget.
.SH BUGS
The buffer-memory is always 0.
The buffer-memory is always 0. There is no distinction on BSDs.
.SH COPYRIGHT
Copyright 1988, Massachusetts Institute of Technology.
.br
@@ -121,4 +121,4 @@ Della Fera (MIT-Athena), and Chris Peterson (MIT-LCS).
.P
Updated 2007/04 by Michelle Konzack <linux4michelle@freenet.de>
.P
Update by Christian Barthel <bch@onfire.org>, 2017/01, OpenBSD support.
Update by Christian Barthel <bch@onfire.org>, 2017/01, OpenBSD support.

3
xmem.c
View File

@@ -1,7 +1,8 @@
/*
* xmem - display memory/swap usage utility for X
*
* Copyright 2017 Christian Barthel <bch@onfire.org>
* Updated by Christian Barthel <bch@onfire.org>
*
* Copyright 1989 Massachusetts Institute of Technology
*
* $XConsortium: xload.c,v 1.36 91/05/24 16:57:46 converse Exp $