diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2002-04-01 18:46:58 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2002-04-01 18:46:58 +0800 |
commit | 3b677189c4f72973b36631756d2c178ac7f8572a (patch) | |
tree | 7a1ddbcabdc908d8aaef36e44ecbe0c45089ce50 /net-mgmt/smokeping | |
parent | 5a2415d0ff5db80cdea99258e2f9d389f8f6ed35 (diff) | |
download | freebsd-ports-gnome-3b677189c4f72973b36631756d2c178ac7f8572a.tar.gz freebsd-ports-gnome-3b677189c4f72973b36631756d2c178ac7f8572a.tar.zst freebsd-ports-gnome-3b677189c4f72973b36631756d2c178ac7f8572a.zip |
Add smokeping 1.5, latency logging and graphing system.
This port is heavily modified by kuriyama:
o Use BSD'ish directory hierarchy (imcomplete)
TODO for this port (will be done by kuriyama)
o Upgrade to 1.6 (see follow-up of this PR)
o Use non-privileged UID for smokeping
o Move *.pm to $PREFIX/lib/perl5/site_perl
PR: ports/36006
Submitted by: Lars Thegler <lars@thegler.dk>
Diffstat (limited to 'net-mgmt/smokeping')
-rw-r--r-- | net-mgmt/smokeping/Makefile | 101 | ||||
-rw-r--r-- | net-mgmt/smokeping/distinfo | 1 | ||||
-rw-r--r-- | net-mgmt/smokeping/files/smokeping.sh | 23 | ||||
-rw-r--r-- | net-mgmt/smokeping/pkg-comment | 1 | ||||
-rw-r--r-- | net-mgmt/smokeping/pkg-deinstall | 23 | ||||
-rw-r--r-- | net-mgmt/smokeping/pkg-descr | 8 | ||||
-rw-r--r-- | net-mgmt/smokeping/pkg-message | 31 | ||||
-rw-r--r-- | net-mgmt/smokeping/pkg-plist | 79 |
8 files changed, 267 insertions, 0 deletions
diff --git a/net-mgmt/smokeping/Makefile b/net-mgmt/smokeping/Makefile new file mode 100644 index 000000000000..4ce250fc8537 --- /dev/null +++ b/net-mgmt/smokeping/Makefile @@ -0,0 +1,101 @@ +# New ports collection makefile for: SmokePing +# Date created: Tue Feb 12 22:17:40 CET 2002 +# Whom: Lars Thegler <lars@thegler.dk> +# +# $FreeBSD$ +# + +PORTNAME= smokeping +PORTVERSION= 1.5 +CATEGORIES= net www +MASTER_SITES= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/ + +MAINTAINER= lars@thegler.dk + +BUILD_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool \ + ${SITE_PERL}/CGI/SpeedyCGI.pm:${PORTSDIR}/www/p5-CGI-SpeedyCGI \ + ${SITE_PERL}/BER.pm:${PORTSDIR}/net/p5-SNMP_Session \ + ${LOCALBASE}/sbin/fping:${PORTSDIR}/net/fping + +USE_PERL5= yes + +MAN1= EchoPing.pm.1 EchoPingChargen.pm.1 EchoPingDiscard.pm.1 \ + EchoPingHttp.pm.1 EchoPingHttps.pm.1 \ + EchoPingIcp.pm.1 EchoPingSmtp.pm.1 \ + FPing.pm.1 ParseConfig.pm.1 Smokeping.pm.1 \ + base.pm.1 basefork.pm.1 basevars.pm.1 \ + smokeping.1 smokeping.cgi.1 \ + smokeping_config.1 smokeping_install.1 + +PKGMESSAGE= ${WRKDIR}/pkg-message +SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} +DOCDIR= ${PREFIX}/share/doc/smokeping +DOC1= CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO +DOC2= EchoPing.pm EchoPingChargen.pm EchoPingDiscard.pm \ + EchoPingHttp.pm EchoPingHttps.pm \ + EchoPingIcp.pm EchoPingSmtp.pm \ + FPing.pm ParseConfig.pm Smokeping.pm \ + base.pm basefork.pm basevars.pm smokeping.cgi \ + smokeping smokeping_config smokeping_install + +pre-patch: + @${MV} ${WRKSRC}/bin/smokeping.dist ${WRKSRC}/bin/smokeping + @${MV} ${WRKSRC}/htdocs/smokeping.cgi.dist ${WRKSRC}/htdocs/smokeping.cgi + @${PERL} -pi -e ' \ + s|/usr/sepp/bin/perl|${PERL}|; \ + s|/usr/sepp/bin/speedy|${PREFIX}/bin/speedy|; \ + s|use lib qw\(/usr/pack/rrdtool-1.0.33-to/lib/perl\);\n||; \ + s|/home/oetiker/data/projects/AADJ-smokeping/dist|${PREFIX}/smokeping|; \ + s|/home/oetiker/.smokeping/config|${PREFIX}/smokeping/etc/config|; \ + s|/usr/lib/sendmail|/usr/sbin/sendmail|; \ + s|/usr/sepp/bin/fping|${PREFIX}/sbin/fping|; \ + s|piddir = /usr/local/smokeping/var|piddir = /var/run|; \ + s|imgcache = /home/oetiker/public_html/.simg|imgcache = ${PREFIX}/smokeping/htdocs/img|; \ + s|imgurl = ../.simg|imgurl = /smokeimg|; \ + ' \ + ${WRKSRC}/bin/smokeping ${WRKSRC}/htdocs/smokeping.cgi ${WRKSRC}/etc/config.dist + @${PERL} -p -e ' \ + s|%%PREFIX%%|${PREFIX}|g; \ + ' \ + ${PKGDIR}/pkg-message > ${PKGMESSAGE} + +do-build: + @${RM} ${WRKSRC}/doc/.cvsignore + @${RM} ${WRKSRC}/lib/BER.pm + @${RM} ${WRKSRC}/lib/SNMP_*.pm + @${RM} ${WRKSRC}/doc/*.pod + @${RM} ${WRKSRC}/Makefile + +do-install: + @${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping ${PREFIX}/bin +.for file in ${MAN1} + @${INSTALL_MAN} ${WRKSRC}/doc/${file} ${PREFIX}/man/man1 + @${RM} -f ${WRKSRC}/doc/${file} +.endfor + @${MKDIR} ${DOCDIR} +.for file in ${DOC1} + @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCDIR} +.endfor +.for file in ${DOC2} + @${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${DOCDIR} + @${INSTALL_DATA} ${WRKSRC}/doc/${file}.txt ${DOCDIR} +.endfor + @${MKDIR} ${PREFIX}/smokeping + @${CP} -Rp ${WRKSRC}/[e-l]* ${PREFIX}/smokeping/ +.for file in config smokemail basepage.html config-echoping + @if [ ! -f ${PREFIX}/smokeping/etc/${file} ]; then \ + ${CP} ${PREFIX}/smokeping/etc/${file}.dist ${PREFIX}/smokeping/etc/${file} ; \ + fi +.endfor + @${MKDIR} ${PREFIX}/smokeping/var + @${MKDIR} ${PREFIX}/smokeping/htdocs/img + @${CHOWN} www:www ${PREFIX}/smokeping/htdocs/img + @if [ ! -f ${PREFIX}/etc/rc.d/smokeping.sh ]; then \ + ${ECHO} "Installing ${PREFIX}/etc/rc.d/smokeping.sh startup file."; \ + ${INSTALL_SCRIPT} ${FILESDIR}/smokeping.sh ${PREFIX}/etc/rc.d/smokeping.sh; \ + fi + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net-mgmt/smokeping/distinfo b/net-mgmt/smokeping/distinfo new file mode 100644 index 000000000000..c32a06e5abab --- /dev/null +++ b/net-mgmt/smokeping/distinfo @@ -0,0 +1 @@ +MD5 (smokeping-1.5.tar.gz) = 06313500d18199d36a5e2d3fa61d40b0 diff --git a/net-mgmt/smokeping/files/smokeping.sh b/net-mgmt/smokeping/files/smokeping.sh new file mode 100644 index 000000000000..44e3bd0309f5 --- /dev/null +++ b/net-mgmt/smokeping/files/smokeping.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + [ -r ${PREFIX}/smokeping/etc/config ] && ${PREFIX}/bin/smokeping > /dev/null && echo -n ' smokeping' + ;; +restart) + [ -r ${PREFIX}/smokeping/etc/config ] && ${PREFIX}/bin/smokeping --restart > /dev/null && echo -n ' smokeping' + ;; +stop) + [ -r /var/run/smokeping.pid ] && kill `cat /var/run/smokeping.pid` > /dev/null && echo -n ' smokeping' + ;; +*) + echo "Usage: `basename $0` {start|restart|stop}" >&2 + ;; +esac + +exit 0 diff --git a/net-mgmt/smokeping/pkg-comment b/net-mgmt/smokeping/pkg-comment new file mode 100644 index 000000000000..5a62f946a7a7 --- /dev/null +++ b/net-mgmt/smokeping/pkg-comment @@ -0,0 +1 @@ +Latency logging and graphing system diff --git a/net-mgmt/smokeping/pkg-deinstall b/net-mgmt/smokeping/pkg-deinstall new file mode 100644 index 000000000000..65f707cb86d5 --- /dev/null +++ b/net-mgmt/smokeping/pkg-deinstall @@ -0,0 +1,23 @@ +#!/bin/sh +# $FreeBSD$ +# + +if [ -f /var/run/smokeping.pid ]; then + if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then + ${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null + fi + rm /var/run/smokeping.pid +fi + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +if [ -d ${PKG_PREFIX}/smokeping ]; then + echo "----------------------------------------------------------------" + echo "To delete your custom SmokePing configuration and all collected" + echo "data permanently, use 'rm -R ${PKG_PREFIX}/smokeping'" + echo "----------------------------------------------------------------" +fi + +exit 0 diff --git a/net-mgmt/smokeping/pkg-descr b/net-mgmt/smokeping/pkg-descr new file mode 100644 index 000000000000..4dabde0428dd --- /dev/null +++ b/net-mgmt/smokeping/pkg-descr @@ -0,0 +1,8 @@ +SmokePing is a latency logging and graphing system. It consists of a +daemon process which organizes the latency measurements and a CGI +which presents the graphs. + +WWW: http://ee-staff.ethz.ch/~oetiker/webtools/smokeping + +--lars +lars@thegler.dk diff --git a/net-mgmt/smokeping/pkg-message b/net-mgmt/smokeping/pkg-message new file mode 100644 index 000000000000..77c6243373dc --- /dev/null +++ b/net-mgmt/smokeping/pkg-message @@ -0,0 +1,31 @@ +================================================================= + +SmokePing has now been installed in %%PREFIX%%/smokeping/. + +NOTE: A set of sample configuration files have been installed: + + %%PREFIX%%/smokeping/etc/config + %%PREFIX%%/smokeping/etc/smokemail + %%PREFIX%%/smokeping/etc/basepage.html + %%PREFIX%%/smokeping/etc/config-echoping + +You need edit these to suit your requirements. Please refer to +%%PREFIX%%/share/doc/smokeping/smokeping_install.txt and +%%PREFIX%%/share/doc/smokeping/smokeping_config.txt for further +details on installation and configuration. + + +Once configured, you can start SmokePing data collection by running: + + %%PREFIX%%/etc/rc.d/smokeping.sh start + + +To enable Apache web access, add the following to your +%%PREFIX%%/etc/apache/httpd.conf: + + ScriptAlias /smokeping.cgi %%PREFIX%%/smokeping/htdocs/smokeping.cgi + Alias /smokeimg/ %%PREFIX%%/smokeping/htdocs/img/ + +Enjoy! + +================================================================= diff --git a/net-mgmt/smokeping/pkg-plist b/net-mgmt/smokeping/pkg-plist new file mode 100644 index 000000000000..9bc8806023c3 --- /dev/null +++ b/net-mgmt/smokeping/pkg-plist @@ -0,0 +1,79 @@ +bin/smokeping +share/doc/smokeping/CHANGES +share/doc/smokeping/CONTRIBUTORS +share/doc/smokeping/COPYING +share/doc/smokeping/COPYRIGHT +share/doc/smokeping/README +share/doc/smokeping/TODO +share/doc/smokeping/EchoPing.pm.html +share/doc/smokeping/EchoPing.pm.txt +share/doc/smokeping/EchoPingChargen.pm.html +share/doc/smokeping/EchoPingChargen.pm.txt +share/doc/smokeping/EchoPingDiscard.pm.html +share/doc/smokeping/EchoPingDiscard.pm.txt +share/doc/smokeping/EchoPingHttp.pm.html +share/doc/smokeping/EchoPingHttp.pm.txt +share/doc/smokeping/EchoPingHttps.pm.html +share/doc/smokeping/EchoPingHttps.pm.txt +share/doc/smokeping/EchoPingIcp.pm.html +share/doc/smokeping/EchoPingIcp.pm.txt +share/doc/smokeping/EchoPingSmtp.pm.html +share/doc/smokeping/EchoPingSmtp.pm.txt +share/doc/smokeping/FPing.pm.html +share/doc/smokeping/FPing.pm.txt +share/doc/smokeping/ParseConfig.pm.html +share/doc/smokeping/ParseConfig.pm.txt +share/doc/smokeping/Smokeping.pm.html +share/doc/smokeping/Smokeping.pm.txt +share/doc/smokeping/base.pm.html +share/doc/smokeping/base.pm.txt +share/doc/smokeping/basefork.pm.html +share/doc/smokeping/basefork.pm.txt +share/doc/smokeping/basevars.pm.html +share/doc/smokeping/basevars.pm.txt +share/doc/smokeping/smokeping.cgi.html +share/doc/smokeping/smokeping.cgi.txt +share/doc/smokeping/smokeping.html +share/doc/smokeping/smokeping.txt +share/doc/smokeping/smokeping_config.html +share/doc/smokeping/smokeping_config.txt +share/doc/smokeping/smokeping_install.html +share/doc/smokeping/smokeping_install.txt +@unexec if cmp -s %D/smokeping/etc/basepage.html %D/smokeping/etc/basepage.html.dist; then rm -f %D/smokeping/etc/basepage.html; fi +smokeping/etc/basepage.html.dist +@exec [ -f %B/basepage.html ] || cp %B/%f %B/basepage.html +@unexec if cmp -s %D/smokeping/etc/config %D/smokeping/etc/config.dist; then rm -f %D/smokeping/etc/config; fi +smokeping/etc/config.dist +@exec [ -f %B/config ] || cp %B/%f %B/config +@unexec if cmp -s %D/smokeping/etc/smokemail %D/smokeping/etc/smokemail.dist; then rm -f %D/smokeping/etc/smokemail; fi +smokeping/etc/smokemail.dist +@exec [ -f %B/smokemail ] || cp %B/%f %B/smokemail +@unexec if cmp -s %D/smokeping/etc/config-echoping %D/smokeping/etc/config-echoping.dist; then rm -f %D/smokeping/etc/config-echoping; fi +smokeping/etc/config-echoping.dist +@exec [ -f %B/config-echoping ] || cp %B/%f %B/config-echoping +smokeping/htdocs/smokeping.cgi +smokeping/lib/Smokeping.pm +smokeping/lib/probes/FPing.pm +smokeping/lib/probes/base.pm +smokeping/lib/probes/EchoPing.pm +smokeping/lib/probes/EchoPingChargen.pm +smokeping/lib/probes/EchoPingDiscard.pm +smokeping/lib/probes/EchoPingHttp.pm +smokeping/lib/probes/EchoPingHttps.pm +smokeping/lib/probes/EchoPingIcp.pm +smokeping/lib/probes/EchoPingSmtp.pm +smokeping/lib/probes/basefork.pm +smokeping/lib/probes/basevars.pm +smokeping/lib/ISG/ParseConfig.pm +etc/rc.d/smokeping.sh +@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img +@unexec rm -rf %D/smokeping/htdocs/img +@exec mkdir -p %D/smokeping/var +@unexec rmdir %D/smokeping/var || true +@unexec rmdir %D/smokeping/etc || true +@dirrm smokeping/htdocs +@dirrm smokeping/lib/probes +@dirrm smokeping/lib/ISG +@dirrm smokeping/lib +@dirrm share/doc/smokeping +@unexec rmdir %D/smokeping || true |