From a5f7c3df4846c1eb69d96bcdc54bad49fa450276 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Wed, 12 Oct 2011 19:57:02 +0000 Subject: [PATCH] initial ebuild with muxing rc script Package-Manager: portage-2.1.10.27/cvs/Linux x86_64 --- net-analyzer/softflowd/ChangeLog | 10 ++++ net-analyzer/softflowd/Manifest | 16 ++++++ net-analyzer/softflowd/files/softflowd.confd | 6 +++ net-analyzer/softflowd/files/softflowd.initd | 52 +++++++++++++++++++ net-analyzer/softflowd/metadata.xml | 6 +++ net-analyzer/softflowd/softflowd-0.9.8.ebuild | 28 ++++++++++ 6 files changed, 118 insertions(+) create mode 100644 net-analyzer/softflowd/ChangeLog create mode 100644 net-analyzer/softflowd/Manifest create mode 100644 net-analyzer/softflowd/files/softflowd.confd create mode 100644 net-analyzer/softflowd/files/softflowd.initd create mode 100644 net-analyzer/softflowd/metadata.xml create mode 100644 net-analyzer/softflowd/softflowd-0.9.8.ebuild diff --git a/net-analyzer/softflowd/ChangeLog b/net-analyzer/softflowd/ChangeLog new file mode 100644 index 000000000000..6b0dfcf9722e --- /dev/null +++ b/net-analyzer/softflowd/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for net-analyzer/softflowd +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/softflowd/ChangeLog,v 1.1 2011/10/12 19:57:02 vadimk Exp $ + +*softflowd-0.9.8 (12 Oct 2011) + + 12 Oct 2011; Vadim Kuznetsov +softflowd-0.9.8.ebuild, + +files/softflowd.confd, +files/softflowd.initd: + initial ebuild with muxing rc scripts + diff --git a/net-analyzer/softflowd/Manifest b/net-analyzer/softflowd/Manifest new file mode 100644 index 000000000000..a0a5fa63ade2 --- /dev/null +++ b/net-analyzer/softflowd/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX softflowd.confd 154 RMD160 8b2be1295c4eb70d132f3d571cf4bc5172da4026 SHA1 210cac90183a3d62d6853be3220fd19f75f9550f SHA256 9076e61bf75800683fe1fcff3f528e106701cecdab8d02e8001d03ccb4d51576 +AUX softflowd.initd 1538 RMD160 b8acee174cc9d23fd803018a95ada99174cadca2 SHA1 dd2ee6d0b96e176eca684643bd74ca540b8a7078 SHA256 ed1fd8a0fb3d997faf008dd70c2d0c33b9c7f284e28be753c5fd7f5e680c8a60 +DIST softflowd-0.9.8.tar.gz 89839 RMD160 5ef469c561bef055c7417e7b51e1597f3ee1fb08 SHA1 6ea18cfe9d3d3865749f59f9b466a56fc7fb86cb SHA256 529c854a8274280922813ccf0ab97cf492c915f1be17cf6b76a82bd1abeab8c3 +EBUILD softflowd-0.9.8.ebuild 759 RMD160 2339830ab5089481f91e28751874a435ed2067af SHA1 33076cb2ef3ee56d65ff8def6878b2ba08112b68 SHA256 3df55260c1903210a6564df59e197c1b22bd522de31dcb1d01973295937527d0 +MISC ChangeLog 416 RMD160 850858c61eacaefb27bd8cd9982177515d52bcca SHA1 4b9b0aa0b7106c2404b4fb8bca48bfbc6db6429c SHA256 da943529a84a2fe55f6e0e34db4a8203c07982660cce64083a948021521638f5 +MISC metadata.xml 281 RMD160 682a74bb28c0b86aeefad576d16f7c5a5f699567 SHA1 e4c772cc38482c661a8581c98baf1b68f65b45e1 SHA256 b498dbfab8d932378b8c143bfd0b2e1d3eca73bea24894b5b7b2baf182b8eade +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.18 (GNU/Linux) + +iEYEARECAAYFAk6V8EsACgkQiLKviuHfItWoawCg0h4I6vncx0yONxolplwD3dvw +EdAAoIkbYtnCTvY+In9Sd3s5cyetgk6g +=2ToM +-----END PGP SIGNATURE----- diff --git a/net-analyzer/softflowd/files/softflowd.confd b/net-analyzer/softflowd/files/softflowd.confd new file mode 100644 index 000000000000..125de16a3875 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd.confd @@ -0,0 +1,6 @@ +# Copy conf file to softflowd.interface + +# SOFTFLOWD_COLLECTOR=host:port +# SOFTFLOWD_TIMEOUTS="maxlife=600" +# SOFTFLOWD_MAXFLOWS=17000 +# SOFTFLOWD_EXTRA= diff --git a/net-analyzer/softflowd/files/softflowd.initd b/net-analyzer/softflowd/files/softflowd.initd new file mode 100644 index 000000000000..0b72bdcbfdf3 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd.initd @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/softflowd/files/softflowd.initd,v 1.1 2011/10/12 19:57:02 vadimk Exp $ + +depend() { + need net +} + +softflowd_checkconfig() { + SOFTFLOWD_INTERFACE=${SVCNAME#*.} + if [ ${SOFTFLOWD_INTERFACE} = ${SVCNAME} ]; then + eerror "You have to create an init script for each interface:" + eerror "ln -s softflowd /etc/init.d/softflowd.eth0" + return 1 + fi + + if [ -z "${SOFTFLOWD_COLLECTOR}" ]; then + eerror "Specify the host and port that the accounting datagrams are to be" + eerror "sent to in /etc/conf.d/${SVCNAME}." + eerror "Example: SOFTFLOWD_COLLECTOR=collector.example.com:9995" + return 1 + fi + SOFTFLOWD_PIDFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.pid" + SOFTFLOWD_CTLFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.ctl" +} + + +start() { + softflowd_checkconfig || return 1 + + ebegin "Starting softflowd on interface ${SOFTFLOWD_INTERFACE}" + start-stop-daemon --start \ + --exec /usr/sbin/softflowd \ + -- -i "${SOFTFLOWD_INTERFACE}" \ + -n "${SOFTFLOWD_COLLECTOR}" \ + -p "${SOFTFLOWD_PIDFILE}" \ + -c "${SOFTFLOWD_CTLFILE}" \ + -t "${SOFTFLOWD_TIMEOUTS-maxlife=600}" \ + -m "${SOFTFLOWD_MAXFLOWS-17000}" \ + ${SOFTFLOWD_EXTRA} + eend $? +} + +stop() { + softflowd_checkconfig || return 1 + + ebegin "Stopping softflowd on interface ${SOFTFLOWD_INTERFACE}" + # use softflowd's own way to shut it down + /usr/sbin/softflowctl -c ${SOFTFLOWD_CTLFILE} shutdown + eend $? +} diff --git a/net-analyzer/softflowd/metadata.xml b/net-analyzer/softflowd/metadata.xml new file mode 100644 index 000000000000..f4d1177da4dd --- /dev/null +++ b/net-analyzer/softflowd/metadata.xml @@ -0,0 +1,6 @@ + + + +netmon +Softflowd is flow-based network traffic analyser capable of Cisco NetFlow data export. + diff --git a/net-analyzer/softflowd/softflowd-0.9.8.ebuild b/net-analyzer/softflowd/softflowd-0.9.8.ebuild new file mode 100644 index 000000000000..90a5dabbf214 --- /dev/null +++ b/net-analyzer/softflowd/softflowd-0.9.8.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/softflowd/softflowd-0.9.8.ebuild,v 1.1 2011/10/12 19:57:02 vadimk Exp $ + +EAPI=3 + +DESCRIPTION="A flow-based network monitor." +HOMEPAGE="http://www.mindrot.org/softflowd.html" +SRC_URI="http://softflowd.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc ChangeLog README TODO + + insinto /usr/share/doc/${PF}/examples + doins collector.pl + + newinitd "${FILESDIR}/softflowd.initd" "softflowd" + newconfd "${FILESDIR}/softflowd.confd" "softflowd" +} -- 2.26.2