diff options
author | triaxx <triaxx@pkgsrc.org> | 2019-10-02 14:30:31 +0000 |
---|---|---|
committer | triaxx <triaxx@pkgsrc.org> | 2019-10-02 14:30:31 +0000 |
commit | 54e30b4a3fc8f22925dc1d4ae2260a742fd15544 (patch) | |
tree | db212fa5195088a19fbab74f553be2109ebdb3bf /mail | |
parent | 9fdf336359308ee8759ff6a85afbb4345b4652fb (diff) | |
download | pkgsrc-54e30b4a3fc8f22925dc1d4ae2260a742fd15544.tar.gz |
mailgraph: update to 1.14nb6
kim@ approved and Roland reviewed. Thanks to them!
pkgsrc changes
--------------
* Some cosmetics
* Add missing CSS file
* Change SUBST_SED to patch+SUBST_VARS
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mailgraph/Makefile | 56 | ||||
-rw-r--r-- | mail/mailgraph/PLIST | 3 | ||||
-rw-r--r-- | mail/mailgraph/distinfo | 4 | ||||
-rw-r--r-- | mail/mailgraph/patches/patch-mailgraph.cgi | 19 | ||||
-rw-r--r-- | mail/mailgraph/patches/patch-mailgraph.pl | 67 |
5 files changed, 115 insertions, 34 deletions
diff --git a/mail/mailgraph/Makefile b/mail/mailgraph/Makefile index 2d1ea8d82cb..e9d992ba871 100644 --- a/mail/mailgraph/Makefile +++ b/mail/mailgraph/Makefile @@ -1,58 +1,50 @@ -# $NetBSD: Makefile,v 1.25 2019/08/11 13:21:29 wiz Exp $ -# +# $NetBSD: Makefile,v 1.26 2019/10/02 14:30:31 triaxx Exp $ DISTNAME= mailgraph-1.14 -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= mail -MASTER_SITES= http://mailgraph.schweikert.ch/pub/ -MASTER_SITES+= http://mailgraph.schweikert.ch/pub/old +MASTER_SITES= https://mailgraph.schweikert.ch/pub/ +MASTER_SITES+= https://mailgraph.schweikert.ch/pub/old/ -MAINTAINER= kim@tac.nyc.ny.us +MAINTAINER= triaxx@NetBSD.org HOMEPAGE= http://mailgraph.schweikert.ch/ COMMENT= RRDtool frontend for mail statistics +LICENSE= gnu-gpl-v2 DEPENDS+= rrdtool>=1:../../databases/rrdtool DEPENDS+= p5-File-Tail-[0-9]*:../../misc/p5-File-Tail USE_TOOLS+= perl:run +NO_BUILD= yes -.include "../../mk/bsd.prefs.mk" +REPLACE_PERL+= mailgraph.cgi mailgraph.pl -DBDIR?= ${VARBASE}/db/${PKGBASE} +BUILD_DEFS+= VARBASE -MG_SCRIPTS= mailgraph.cgi mailgraph.pl - -REPLACE_PERL+= ${MG_SCRIPTS} +OWN_DIRS+= ${VARBASE}/db/mailgraph RCD_SCRIPTS= mailgraph -SUBST_CLASSES+= defs -SUBST_STAGE.defs= pre-build -SUBST_FILES.defs= ${MG_SCRIPTS} -# Database -SUBST_SED.defs+= -e 's,/var/log\([^/]\),${DBDIR}\1,g' -SUBST_SED.defs+= -e 's,/var/log$$,${DBDIR},g' -# Logfile -SUBST_SED.defs+= -e 's,/var/log/syslog,${VARBASE}/log/maillog,g' -# -SUBST_MESSAGE.defs= Fixing defaults. - -INSTALLATION_DIRS= sbin - -do-build: +SUBST_CLASSES+= var +SUBST_STAGE.var= pre-configure +SUBST_MESSAGE.var= Fixing hardcoded /var. +SUBST_FILES.var= mailgraph.cgi mailgraph.pl +SUBST_VARS.var= VARBASE -do-configure: +AUTO_MKDIRS= yes do-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/libexec/cgi-bin ${INSTALL_SCRIPT} ${WRKSRC}/mailgraph.cgi \ ${DESTDIR}${PREFIX}/libexec/cgi-bin/mailgraph.cgi ${INSTALL_SCRIPT} ${WRKSRC}/mailgraph.pl \ ${DESTDIR}${PREFIX}/sbin/mailgraph - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/mailgraph -.for i in CHANGES COPYING README - ${INSTALL_DATA} ${WRKSRC}/${i} \ - ${DESTDIR}${PREFIX}/share/doc/mailgraph/${i} -.endfor + ${INSTALL_DATA} ${WRKSRC}/mailgraph.css \ + ${DESTDIR}${PREFIX}/share/mailgraph/mailgraph.css + ${INSTALL_DATA} ${WRKSRC}/CHANGES \ + ${DESTDIR}${PREFIX}/share/doc/mailgraph/CHANGES + ${INSTALL_DATA} ${WRKSRC}/COPYING \ + ${DESTDIR}${PREFIX}/share/doc/mailgraph/COPYING + ${INSTALL_DATA} ${WRKSRC}/README \ + ${DESTDIR}${PREFIX}/share/doc/mailgraph/README .include "../../mk/bsd.pkg.mk" diff --git a/mail/mailgraph/PLIST b/mail/mailgraph/PLIST index edb0fc2a8d1..a7100330a81 100644 --- a/mail/mailgraph/PLIST +++ b/mail/mailgraph/PLIST @@ -1,6 +1,7 @@ -@comment $NetBSD: PLIST,v 1.5 2014/03/11 14:05:03 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.6 2019/10/02 14:30:31 triaxx Exp $ libexec/cgi-bin/mailgraph.cgi sbin/mailgraph share/doc/mailgraph/CHANGES share/doc/mailgraph/COPYING share/doc/mailgraph/README +share/mailgraph/mailgraph.css diff --git a/mail/mailgraph/distinfo b/mail/mailgraph/distinfo index 59517b1ea22..ad276eefb29 100644 --- a/mail/mailgraph/distinfo +++ b/mail/mailgraph/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.6 2015/11/03 23:27:08 agc Exp $ +$NetBSD: distinfo,v 1.7 2019/10/02 14:30:31 triaxx Exp $ SHA1 (mailgraph-1.14.tar.gz) = 6a2ead01ffd8fe49e520057daf97072e106b6c69 RMD160 (mailgraph-1.14.tar.gz) = 928969a4bdc3b9ff39a7fe16b98789f07b02e5f8 SHA512 (mailgraph-1.14.tar.gz) = 3df0dae010ad166a157eb34a8b1fcf837ab42445d417855ea58937a75b74ca55c06044eefb6077a6117073c39a087bcdf5f58fe35c0e4d9c7d6b18bded7a0193 Size (mailgraph-1.14.tar.gz) = 22014 bytes +SHA1 (patch-mailgraph.cgi) = 835d3537dc95f91f860857f45c542ca01bc12082 +SHA1 (patch-mailgraph.pl) = 80cc08394f66903c6414b25094899399b464460f diff --git a/mail/mailgraph/patches/patch-mailgraph.cgi b/mail/mailgraph/patches/patch-mailgraph.cgi new file mode 100644 index 00000000000..1def0777c9e --- /dev/null +++ b/mail/mailgraph/patches/patch-mailgraph.cgi @@ -0,0 +1,19 @@ +$NetBSD: patch-mailgraph.cgi,v 1.1 2019/10/02 14:30:31 triaxx Exp $ + +* Change relative path of rrd files to absolute path (maildgraph must be run as + daemon). +* Change hardcoded /var to pkgsrc compliant VARBASE. + +--- mailgraph.cgi.orig 2007-08-29 09:06:01.000000000 +0000 ++++ mailgraph.cgi +@@ -16,8 +16,8 @@ my $xpoints = 540; + my $points_per_sample = 3; + my $ypoints = 160; + my $ypoints_err = 96; +-my $rrd = 'mailgraph.rrd'; # path to where the RRD database is +-my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is ++my $rrd = '@VARBASE@/db/mailgraph/mailgraph.rrd'; # path to where the RRD database is ++my $rrd_virus = '@VARBASE@/db/mailgraph/mailgraph_virus.rrd'; # path to where the Virus RRD database is + my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images + + my @graphs = ( diff --git a/mail/mailgraph/patches/patch-mailgraph.pl b/mail/mailgraph/patches/patch-mailgraph.pl new file mode 100644 index 00000000000..73e77eff971 --- /dev/null +++ b/mail/mailgraph/patches/patch-mailgraph.pl @@ -0,0 +1,67 @@ +$NetBSD: patch-mailgraph.pl,v 1.1 2019/10/02 14:30:31 triaxx Exp $ + +* Use log/maillog as default mail logfile. +* Change hardcoded /var to pkgsrc compliant VARBASE. + +--- mailgraph.pl.orig 2007-08-29 09:06:01.000000000 +0000 ++++ mailgraph.pl +@@ -371,9 +371,9 @@ my $rrdstep = 60; + my $xpoints = 540; + my $points_per_sample = 3; + +-my $daemon_logfile = '/var/log/mailgraph.log'; +-my $daemon_pidfile = '/var/run/mailgraph.pid'; +-my $daemon_rrd_dir = '/var/log'; ++my $daemon_logfile = '@VARBASE@/log/mailgraph.log'; ++my $daemon_pidfile = '@VARBASE@/run/mailgraph.pid'; ++my $daemon_rrd_dir = '@VARBASE@/db/mailgraph'; + + # global variables + my $logfile; +@@ -405,14 +405,14 @@ sub usage + print " -v, --verbose be verbose about what you do\n"; + print " -V, --version output version information and exit\n"; + print " -c, --cat causes the logfile to be only read and not monitored\n"; +- print " -l, --logfile f monitor logfile f instead of /var/log/syslog\n"; ++ print " -l, --logfile f monitor logfile f instead of @VARBASE@/log/maillog\n"; + print " -t, --logtype t set logfile's type (default: syslog)\n"; + print " -y, --year starting year of the log file (default: current year)\n"; + print " --host=HOST use only entries for HOST (regexp) in syslog\n"; + print " -d, --daemon start in the background\n"; +- print " --daemon-pid=FILE write PID to FILE instead of /var/run/mailgraph.pid\n"; +- print " --daemon-rrd=DIR write RRDs to DIR instead of /var/log\n"; +- print " --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log\n"; ++ print " --daemon-pid=FILE write PID to FILE instead of @VARBASE@/run/mailgraph.pid\n"; ++ print " --daemon-rrd=DIR write RRDs to DIR instead of @VARBASE@/log\n"; ++ print " --daemon-log=FILE write verbose-log to FILE instead of @VARBASE@/log/mailgraph.log\n"; + print " --ignore-localhost ignore mail to/from localhost (used for virus scanner)\n"; + print " --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner)\n"; + print " --only-mail-rrd update only the mail rrd\n"; +@@ -461,7 +461,7 @@ sub main + + daemonize if $opt{daemon}; + +- my $logfile = defined $opt{logfile} ? $opt{logfile} : '/var/log/syslog'; ++ my $logfile = defined $opt{logfile} ? $opt{logfile} : '@VARBASE@/log/maillog'; + my $file; + if($opt{cat}) { + $file = $logfile; +@@ -909,14 +909,14 @@ B<mailgraph> [I<options>...] + -v, --verbose be verbose about what you do + -V, --version output version information and exit + -c, --cat causes the logfile to be only read and not monitored +- -l, --logfile f monitor logfile f instead of /var/log/syslog ++ -l, --logfile f monitor logfile f instead of @VARBASE@/log/maillog + -t, --logtype t set logfile's type (default: syslog) + -y, --year starting year of the log file (default: current year) + --host=HOST use only entries for HOST (regexp) in syslog + -d, --daemon start in the background +- --daemon-pid=FILE write PID to FILE instead of /var/run/mailgraph.pid +- --daemon-rrd=DIR write RRDs to DIR instead of /var/log +- --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log ++ --daemon-pid=FILE write PID to FILE instead of @VARBASE@/run/mailgraph.pid ++ --daemon-rrd=DIR write RRDs to DIR instead of @VARBASE@/log ++ --daemon-log=FILE write verbose-log to FILE instead of @VARBASE@/log/mailgraph.log + --ignore-localhost ignore mail to/from localhost (used for virus scanner) + --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner) + --only-mail-rrd update only the mail rrd |