pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/dmesg2gif Import dmesg2gif-1.0: Output dmesg(...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f4dc64ef26de
branches: trunk
changeset: 462943:f4dc64ef26de
user: hubertf <hubertf%pkgsrc.org@localhost>
date: Mon Oct 20 00:31:29 2003 +0000
description:
Import dmesg2gif-1.0: Output dmesg(8) device tree as GIF graph
Read dmesg(8) output (e.g. from /var/run/dmesg.boot), and output the
device tree as GIF image to stdout.
Usage: cat /var/run/dmesg.boot | /usr/pkg/bin/dmesg2gif | xv -
diffstat:
sysutils/dmesg2gif/DESCR | 4 ++++
sysutils/dmesg2gif/Makefile | 25 +++++++++++++++++++++++++
sysutils/dmesg2gif/PLIST | 2 ++
sysutils/dmesg2gif/files/dmesg2gif | 32 ++++++++++++++++++++++++++++++++
4 files changed, 63 insertions(+), 0 deletions(-)
diffs (79 lines):
diff -r 1fdaeab757c9 -r f4dc64ef26de sysutils/dmesg2gif/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmesg2gif/DESCR Mon Oct 20 00:31:29 2003 +0000
@@ -0,0 +1,4 @@
+Read dmesg(8) output (e.g. from /var/run/dmesg.boot), and output the
+device tree as GIF image to stdout.
+
+Usage: cat /var/run/dmesg.boot | /usr/pkg/bin/dmesg2gif | xv -
diff -r 1fdaeab757c9 -r f4dc64ef26de sysutils/dmesg2gif/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmesg2gif/Makefile Mon Oct 20 00:31:29 2003 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/10/20 00:31:29 hubertf Exp $
+#
+
+DISTNAME= dmesg2gif-1.0
+WRKSRC= ${WRKDIR}
+CATEGORIES= sysutils
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= hubertf%NetBSD.org@localhost
+COMMENT= Output dmesg(8) device tree as GIF graph
+
+USE_PKGINSTALL= YES
+
+DEPENDS+= graphviz-[0-9]*:.../../graphics/graphviz
+
+EXTRACT_ONLY= # empty
+NO_CHECKSUM= yes
+NO_CONFIGURE= yes
+NO_BUILD= yes
+
+do-install:
+ ${INSTALL_SCRIPT} ${FILESDIR}/dmesg2gif ${PREFIX}/bin/dmesg2gif
+
+.include "../../mk/bsd.pkg.mk"
diff -r 1fdaeab757c9 -r f4dc64ef26de sysutils/dmesg2gif/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmesg2gif/PLIST Mon Oct 20 00:31:29 2003 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/20 00:31:29 hubertf Exp $
+bin/dmesg2gif
diff -r 1fdaeab757c9 -r f4dc64ef26de sysutils/dmesg2gif/files/dmesg2gif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dmesg2gif/files/dmesg2gif Mon Oct 20 00:31:29 2003 +0000
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (c) 2003 Hubert Feyrer <hubertf%netbsd.org@localhost>
+#
+
+tmp=/tmp/dmesg2gif.$$
+
+if [ -t 0 -o -t 1 ]
+then
+ echo 2>&1 "Usage: cat /var/run/dmesg.boot | $0 | xv -"
+ exit 1
+fi
+
+if ! pkg_info -qe graphviz >/dev/null
+then
+ echo 2>&1 "Please install pkgsrc/graphics/graphviz for dot!"
+ exit 1
+fi
+
+(
+ echo "digraph dmesg { "
+ cat \
+ | grep -v ^# \
+ | perl -ne 'if(/^(\S*) at (\S*) *.*/){
+ $from=$1;
+ $to=$2;
+ $to=~s/://;
+ print "\t$from -> $to\n";
+ }'
+ echo "}"
+) > $tmp.dot
+dot -Tgif $tmp.dot
Home |
Main Index |
Thread Index |
Old Index