summaryrefslogtreecommitdiff
path: root/sysutils/dmesg2gif
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2003-10-20 12:34:43 +0000
committerhubertf <hubertf@pkgsrc.org>2003-10-20 12:34:43 +0000
commitd253d49c1442becbbdb3a26af38ef65da625a684 (patch)
treefbeea4f276c7ee70cab57c637a952ad3b26e0759 /sysutils/dmesg2gif
parentbc7766240ff531aa89f1b5012e0fc91cf22c0e80 (diff)
downloadpkgsrc-d253d49c1442becbbdb3a26af38ef65da625a684.tar.gz
Update to dmesg2gif V1.1. Changes:
* Clean up temp file * Remove runtime check for graphviz package - that's really handled via dependencies * Note requirement for perl Addresses PR 23207 by Robert Elz / munnari.OZ.AU BANG kre /
Diffstat (limited to 'sysutils/dmesg2gif')
-rw-r--r--sysutils/dmesg2gif/DESCR2
-rw-r--r--sysutils/dmesg2gif/Makefile13
-rw-r--r--sysutils/dmesg2gif/files/dmesg2gif16
3 files changed, 15 insertions, 16 deletions
diff --git a/sysutils/dmesg2gif/DESCR b/sysutils/dmesg2gif/DESCR
index e7e7225fcb3..894f0403871 100644
--- a/sysutils/dmesg2gif/DESCR
+++ b/sysutils/dmesg2gif/DESCR
@@ -1,2 +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 --git a/sysutils/dmesg2gif/Makefile b/sysutils/dmesg2gif/Makefile
index 593253cf9b5..54b734905c7 100644
--- a/sysutils/dmesg2gif/Makefile
+++ b/sysutils/dmesg2gif/Makefile
@@ -1,28 +1,25 @@
-# $NetBSD: Makefile,v 1.4 2003/10/20 03:40:40 grant Exp $
+# $NetBSD: Makefile,v 1.5 2003/10/20 12:34:43 hubertf Exp $
#
-DISTNAME= dmesg2gif-1.0
+DISTNAME= dmesg2gif-1.1
WRKSRC= ${WRKDIR}
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= hubertf@NetBSD.org
-COMMENT= Output dmesg(8) device tree as GIF image
-
-DEPENDS+= graphviz-[0-9]*:../../graphics/graphviz
+COMMENT= Output dmesg(8) device tree as GIF graph
USE_PKGINSTALL= YES
-ONLY_FOR_PLATFORM= NetBSD-*-*
+DEPENDS+= graphviz-[0-9]*:.../../graphics/graphviz
+USE_PERL5= yes
EXTRACT_ONLY= # empty
NO_CHECKSUM= yes
NO_CONFIGURE= yes
NO_BUILD= yes
-USE_PERL5= run
-
do-install:
${INSTALL_SCRIPT} ${FILESDIR}/dmesg2gif ${PREFIX}/bin/dmesg2gif
diff --git a/sysutils/dmesg2gif/files/dmesg2gif b/sysutils/dmesg2gif/files/dmesg2gif
index db56586c8b4..f7a9d108420 100644
--- a/sysutils/dmesg2gif/files/dmesg2gif
+++ b/sysutils/dmesg2gif/files/dmesg2gif
@@ -3,7 +3,10 @@
# Copyright (c) 2003 Hubert Feyrer <hubertf@netbsd.org>
#
-tmp=/tmp/dmesg2gif.$$
+tmp=/tmp/dmesg2gif.$$.dot
+
+# Clean up things on ^C
+trap "rm -r $tmp ; exit 1" INT
if [ -t 0 -o -t 1 ]
then
@@ -11,11 +14,6 @@ then
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 { "
@@ -28,5 +26,7 @@ fi
print "\t$from -> $to\n";
}'
echo "}"
-) > $tmp.dot
-dot -Tgif $tmp.dot
+) > $tmp
+dot -Tgif $tmp
+
+rm $tmp