Mercurial > hg > portage
changeset 234:8be68a037e29
bump mrtg to 2.16.4 for perl-5.12
author | holger |
---|---|
date | Sun, 18 Jul 2010 00:32:16 +0200 |
parents | 60c992a46e5e |
children | a3713bbcd1b6 |
files | net-analyzer/mrtg/Manifest net-analyzer/mrtg/files/mrtg.confd net-analyzer/mrtg/files/mrtg.rc net-analyzer/mrtg/metadata.xml net-analyzer/mrtg/mrtg-2.16.4.ebuild |
diffstat | 5 files changed, 122 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/mrtg/Manifest Sun Jul 18 00:32:16 2010 +0200 @@ -0,0 +1,5 @@ +AUX mrtg.confd 512 RMD160 ad2824f21df0ecf864b53250b1e50912b1f17777 SHA1 b3248d27b94155f14240c9d4151c5a789cc152c1 SHA256 fb929fd0e3658bc614f2ba51b9fba748050dbc76c0f1c0ac1bc233559bd2b4e7 +AUX mrtg.rc 1388 RMD160 beb973376ed5f5f1022fdc3caa1fdc5393c18a4a SHA1 11f32fbcc911ae3200eed8a41184cea6e94f93cb SHA256 25aa80a6eac6b7ca09a577c1ff895d40a03c167892aa1f2dde39a5085b24c41a +DIST mrtg-2.16.4.tar.gz 1089068 RMD160 9d7f2573fded09b16cd5b108271b9dd68d78bc18 SHA1 8d810487585c929bf48246311512f88077e10e55 SHA256 6d61fad616f6a73b2080a6ed295ec8d2a021a4e1110db42a2d35b9ad6d3037e6 +EBUILD mrtg-2.16.4.ebuild 1044 RMD160 4ff0f85e3ff5dcd3baddfddf64894244f9dbb0db SHA1 00194c3cff0aad36e790c0fd32ec2b6ac7355ae7 SHA256 6fc5482a5a87a13196579ef5ebe052d549cf3b397e5b5f85a496a2b6a7985534 +MISC metadata.xml 221 RMD160 6a612dbdb85b7cbc15a4f4924fc62b435900bee4 SHA1 59ce39c64900516f7d583951daacb16fc01f0ea1 SHA256 80bafe9d61de4580c061d796ca9c244633349b7a6da85aeae6e11bbaad597110
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/mrtg/files/mrtg.confd Sun Jul 18 00:32:16 2010 +0200 @@ -0,0 +1,17 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mrtg/files/mrtg.confd,v 1.1 2005/01/26 10:35:05 ka0ttic Exp $ + +MRTG_CONF="/etc/mrtg.conf" +MRTG_PID="/var/run/mrtg.pid" + +# uncomment and set the following, if you'd like to run mrtg as a +# different user/group +#MRTG_USER="" +#MRTG_GROUP="" + +# uncomment if you'd like to enable logging +#MRTG_LOG="/var/log/mrtg.log" + +# set any extra options here +MRTG_OPTS=""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/mrtg/files/mrtg.rc Sun Jul 18 00:32:16 2010 +0200 @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mrtg/files/mrtg.rc,v 1.7 2007/04/19 19:08:08 cedk Exp $ + +depend() { + need net + + # if monitoring snmp variables on this machine: + # use net-snmpd +} + +checkconfig() { + if [[ ! -f ${MRTG_CONF} ]] ; then + eerror "Please create ${MRTG_CONF} (try man cfgmaker)" + return 1 + fi + + mrtg --check ${MRTG_CONF} + return $? +} + +start() { + # mrtg will not run if LANG=*utf8 + # use grep instead of bash regexp for bug #159786 + [[ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ]] \ + && LANG='C' + + checkconfig || return $? + + # enable logging? + [[ -n "${MRTG_LOG}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}" + + # run as a different user? + [[ -n "${MRTG_USER}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}" + + # run as a different group? + [[ -n "${MRTG_GROUP}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}" + + ebegin "Starting mrtg" + start-stop-daemon --start --quiet --pidfile ${MRTG_PID} --name mrtg\ + --exec /usr/bin/mrtg -- --daemon --pid-file=${MRTG_PID} \ + ${MRTG_OPTS} ${MRTG_CONF} >/dev/null + eend $? "Failed to start mrtg" +} + +stop() { + ebegin "Stopping mrtg" + start-stop-daemon --stop --quiet --pidfile ${MRTG_PID} + eend $? "Failed to stop mrtg" +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/mrtg/metadata.xml Sun Jul 18 00:32:16 2010 +0200 @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>netmon</herd> +<maintainer> + <email>netmon@gentoo.org</email> +</maintainer> +</pkgmetadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/net-analyzer/mrtg/mrtg-2.16.4.ebuild Sun Jul 18 00:32:16 2010 +0200 @@ -0,0 +1,38 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mrtg/mrtg-2.16.2-r1.ebuild,v 1.1 2010/05/29 04:48:18 pva Exp $ + +EAPI="3" + +DESCRIPTION="A tool to monitor the traffic load on network-links" +HOMEPAGE="http://oss.oetiker.ch/mrtg/" +SRC_URI="http://oss.oetiker.ch/mrtg/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="dev-lang/perl + dev-perl/SNMP_Session + >=media-libs/gd-1.8.4" + +src_prepare() { + rm ./lib/mrtg2/{SNMP_{Session,util},BER}.pm || die +} + +src_install () { + keepdir /var/lib/mrtg + + emake DESTDIR="${ED}" install || die "emake install failed" + mv "${ED}/usr/share/doc/"{mrtg2,${PF}} + + newinitd "${FILESDIR}/mrtg.rc" ${PN} || die + newconfd "${FILESDIR}/mrtg.confd" ${PN} || die +} + +pkg_postinst(){ + elog "You must configure mrtg before being able to run it. Try cfgmaker." + elog "The following thread may be useful:" + elog "http://forums.gentoo.org/viewtopic-t-105862.html" +}