diff options
author | Geert Bevin <gbevin@gentoo.org> | 2002-01-30 13:36:48 +0000 |
---|---|---|
committer | Geert Bevin <gbevin@gentoo.org> | 2002-01-30 13:36:48 +0000 |
commit | 51866c0c709c48ffc0d67daa9b2370dd83e62949 (patch) | |
tree | 4d8efcf097b17eff53e7be5bc1f32bbd5d44e187 /net-mail/qmailanalog | |
parent | Nice Clock Form WindowMaker (diff) | |
download | historical-51866c0c709c48ffc0d67daa9b2370dd83e62949.tar.gz historical-51866c0c709c48ffc0d67daa9b2370dd83e62949.tar.bz2 historical-51866c0c709c48ffc0d67daa9b2370dd83e62949.zip |
initial qmailanalog portage version, reflected in qmail-sumo
Diffstat (limited to 'net-mail/qmailanalog')
-rw-r--r-- | net-mail/qmailanalog/files/digest-qmailanalog-0.70 | 1 | ||||
-rw-r--r-- | net-mail/qmailanalog/files/tai64nfrac.c | 67 | ||||
-rw-r--r-- | net-mail/qmailanalog/qmailanalog-0.70.ebuild | 32 |
3 files changed, 100 insertions, 0 deletions
diff --git a/net-mail/qmailanalog/files/digest-qmailanalog-0.70 b/net-mail/qmailanalog/files/digest-qmailanalog-0.70 new file mode 100644 index 000000000000..f3c4ea162048 --- /dev/null +++ b/net-mail/qmailanalog/files/digest-qmailanalog-0.70 @@ -0,0 +1 @@ +MD5 84a3d44cbf2dbd88e8b97edd98c65732 qmailanalog-0.70.tar.gz 28416 diff --git a/net-mail/qmailanalog/files/tai64nfrac.c b/net-mail/qmailanalog/files/tai64nfrac.c new file mode 100644 index 000000000000..7d39149fe923 --- /dev/null +++ b/net-mail/qmailanalog/files/tai64nfrac.c @@ -0,0 +1,67 @@ +/* $Id: tai64nfrac.c,v 1.1 2002/01/30 13:36:48 gbevin Exp $ + + Convert external TAI64N timestamps to fractional seconds since epoch. + + Written by Russ Allbery <rra@stanford.edu> + This work is in the public domain. + +Usage: + +tai64nfrac < input > output + +Expects the input stream to be a sequence of lines beginning with @, a +timestamp in external TAI64N format, and a space. Replaces the @ and the +timestamp with fractional seconds since epoch (1970-01-01 00:00:00 UTC). +The input time format is the format written by tai64n and multilog. The +output time format is expected by qmailanalog. */ + +#include <stdio.h> + +/* Read a TAI64N external format timestamp from stdin and write fractional + seconds since epoch (TAI, not UTC) to stdout. Return the character after + the timestamp. */ +int decode(void) +{ + int c; + unsigned long u; + unsigned long seconds = 0; + unsigned long nanoseconds = 0; + + while ((c = getchar()) != EOF) + { + u = c - '0'; + if (u >= 10) + { + u = c - 'a'; + if (u >= 6) break; + u += 10; + } + seconds <<= 4; + seconds += nanoseconds >> 28; + nanoseconds &= 0xfffffff; + nanoseconds <<= 4; + nanoseconds += u; + } + seconds -= 4611686018427387914ULL; + printf("%lu.%lu ", seconds, nanoseconds); + return c; +} + + +int main(void) +{ + int c; + unsigned long seconds; + unsigned long nanoseconds; + + while ((c = getchar()) != EOF) + { + if (c == '@') c = decode(); + while (c != EOF) + { + putchar(c); + if (c == '\n') break; + c = getchar(); + } + } +} diff --git a/net-mail/qmailanalog/qmailanalog-0.70.ebuild b/net-mail/qmailanalog/qmailanalog-0.70.ebuild new file mode 100644 index 000000000000..02dd1cd2f239 --- /dev/null +++ b/net-mail/qmailanalog/qmailanalog-0.70.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Vitaly Kushneriuk <vitaly_kushneriuk@yahoo.com> +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmailanalog/qmailanalog-0.70.ebuild,v 1.1 2002/01/30 13:36:48 gbevin Exp $ + +S=${WORKDIR}/${P} + +DESCRIPTION="collection of tools to help you analyze qmail's activity record." +SRC_URI="http://cr.yp.to/software/${P}.tar.gz" +HOMEPAGE="http://cr.yp.to/qmailanalog.html" + +DEPEND="virtual/glibc + sys-apps/groff" + +src_compile() { + emake || die + gcc ${FILESDIR}/tai64nfrac.c -o tai64nfrac +} + +src_install () { + into /usr + doman matchup.1 xqp.1 xsender.1 xrecipient.1 columnt.1 + dodoc MATCHUP ACCOUNTING BLURB + + insopts -o root -g qmail -m 755 + insinto /var/qmail/bin + into /var/qmail + dobin columnt ddist deferrals failures matchup recipients rhosts + dobin rxdelay senders successes suids xqp xrecipient xsender + dobin zddist zdeferrals zfailures zoverall zrecipients zrhosts + dobin zrxdelay zsenders zsendmail zsuccesses zsuids tai64nfrac +} |