summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/pmacct')
-rw-r--r--net-analyzer/pmacct/ChangeLog9
-rw-r--r--net-analyzer/pmacct/Manifest6
-rw-r--r--net-analyzer/pmacct/files/digest-pmacct-0.7.01
-rw-r--r--net-analyzer/pmacct/files/pmacctd-conf.d10
-rw-r--r--net-analyzer/pmacct/files/pmacctd-init.d35
-rw-r--r--net-analyzer/pmacct/metadata.xml6
-rw-r--r--net-analyzer/pmacct/pmacct-0.7.0.ebuild44
7 files changed, 111 insertions, 0 deletions
diff --git a/net-analyzer/pmacct/ChangeLog b/net-analyzer/pmacct/ChangeLog
new file mode 100644
index 000000000000..37023c12383f
--- /dev/null
+++ b/net-analyzer/pmacct/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for net-analyzer/pmacct
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/ChangeLog,v 1.1 2004/07/09 14:11:02 eldad Exp $
+
+ 09 Jul 2004; Eldad Zack <eldad@gentoo.org> +files/pmacctd-conf.d,
+ +files/pmacctd-init.d:
+ Initial ebuild. Thanks to Bjarke Freund-Hansen
+ <gentoo-bugzilla@rocekiller.dk>. Closes #49912.
+
diff --git a/net-analyzer/pmacct/Manifest b/net-analyzer/pmacct/Manifest
new file mode 100644
index 000000000000..f9f80c36ce8d
--- /dev/null
+++ b/net-analyzer/pmacct/Manifest
@@ -0,0 +1,6 @@
+MD5 95491b12c21869e140dc23899f437460 pmacct-0.7.0.ebuild 1242
+MD5 5c0c55b023d6c7aab14a0edb49a77f78 ChangeLog 403
+MD5 808a9a788ae7955af0a3c442cafee866 metadata.xml 243
+MD5 eb70a019e963808a69c04db57f8dfa6a files/pmacctd-conf.d 318
+MD5 2dbaade26884ea6dd578de0b9246d73b files/pmacctd-init.d 874
+MD5 9c8f7c9b62771e795e0d0477b09d6242 files/digest-pmacct-0.7.0 64
diff --git a/net-analyzer/pmacct/files/digest-pmacct-0.7.0 b/net-analyzer/pmacct/files/digest-pmacct-0.7.0
new file mode 100644
index 000000000000..25cadaf05c84
--- /dev/null
+++ b/net-analyzer/pmacct/files/digest-pmacct-0.7.0
@@ -0,0 +1 @@
+MD5 02b7e756638da1100a25fe449faae1ed pmacct-0.7.0.tar.gz 155161
diff --git a/net-analyzer/pmacct/files/pmacctd-conf.d b/net-analyzer/pmacct/files/pmacctd-conf.d
new file mode 100644
index 000000000000..80354bd3cdcb
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacctd-conf.d
@@ -0,0 +1,10 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/files/pmacctd-conf.d,v 1.1 2004/07/09 14:11:02 eldad Exp $
+
+# Interface to listen on
+INTERFACE="eth0"
+
+# Other options to pass to pmacctd
+#OPTS=""
+
diff --git a/net-analyzer/pmacct/files/pmacctd-init.d b/net-analyzer/pmacct/files/pmacctd-init.d
new file mode 100644
index 000000000000..42f3224dd363
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacctd-init.d
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/files/pmacctd-init.d,v 1.1 2004/07/09 14:11:02 eldad Exp $
+
+depend() {
+ need net
+}
+
+chekconfig() {
+ if [ ! -e /etc/pmacctd.conf ] ; then
+ eerror "You need an /etc/pmacctd.conf file to run pmacctd"
+ return 1
+ fi
+}
+
+start() {
+ chekconfig || return 1
+ ebegin "Starting pmacctd"
+ start-stop-daemon --start --exec /usr/sbin/pmacctd \
+ -- -D -f /etc/pmacctd.conf -i ${INTERFACE} ${OPTS}
+
+ # pmacctd apparently always returns a value > 0 when launched,
+ # and start-stop-daemon sees that an error an therfore always
+ # return 1. So we have to assume everything whent as expected.
+
+ eend
+}
+
+stop() {
+ ebegin "Stopping pmacctd"
+ start-stop-daemon --stop --exec /usr/sbin/pmacctd
+ eend $?
+}
+
diff --git a/net-analyzer/pmacct/metadata.xml b/net-analyzer/pmacct/metadata.xml
new file mode 100644
index 000000000000..e8cec495fc37
--- /dev/null
+++ b/net-analyzer/pmacct/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A network tool to gather ip traffic informations</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/pmacct/pmacct-0.7.0.ebuild b/net-analyzer/pmacct/pmacct-0.7.0.ebuild
new file mode 100644
index 000000000000..d1a8c22545fe
--- /dev/null
+++ b/net-analyzer/pmacct/pmacct-0.7.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/pmacct-0.7.0.ebuild,v 1.1 2004/07/09 14:11:02 eldad Exp $
+
+DESCRIPTION="A network tool to gather ip traffic informations"
+HOMEPAGE="http://www.ba.cnr.it/~paolo/pmacct/"
+SRC_URI="http://www.ba.cnr.it/~paolo/pmacct/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+IUSE="mysql postgres"
+
+RDEPEND="net-libs/libpcap
+ mysql? ( dev-db/mysql )
+ postgres? ( dev-db/postgresql )"
+
+src_compile() {
+ econf `use_enable mysql mysql` \
+ `use_enable postgres pgsql` \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ make install DESTDIR=${D} || die "make install failed"
+ dodoc README EXAMPLE KNOWN-BUGS CONFIG-KEYS FAQS ChangeLog SIGNALS TODO TOOLS || die "dodoc failed"
+
+ for dirname in examples sql pcap; do
+ docinto ${dirname}
+ dodoc ${dirname}/* || die "dodoc failed"
+ done
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/pmacctd-init.d pmacctd || die "newexe failed"
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/pmacctd-conf.d pmacctd || die "newins failed"
+
+ insinto /etc
+ newins ${S}/examples/pmacctd-imt.conf.example pmacctd.conf.example || "newins failed"
+}
+