summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-10-24 15:23:57 +0000
committerPeter Volkov <pva@gentoo.org>2008-10-24 15:23:57 +0000
commit74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225 (patch)
treed87ca8e2122ca64059c88ce3490f26f003209523 /net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild
parentAdded suid bin on fping binary, required by many monitoring tools (nagious, z... (diff)
downloadgentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.tar.gz
gentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.tar.bz2
gentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.zip
Fixes ability to listen on vlan interfaces, bug #231745, thank Tomas Vasek for report and Ross Dougherty for actual tests. Removed old.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-openvz.git-777e816 i686)
Diffstat (limited to 'net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild')
-rw-r--r--net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild b/net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild
new file mode 100644
index 000000000000..3b96d4393f98
--- /dev/null
+++ b/net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/iptraf/iptraf-3.0.0-r5.ebuild,v 1.1 2008/10/24 15:23:57 pva Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="IPTraf is an ncurses-based IP LAN monitor"
+HOMEPAGE="http://iptraf.seul.org/"
+SRC_URI="ftp://iptraf.seul.org/pub/iptraf/${P}.tar.gz
+ mirror://gentoo/${P}-ipv6.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6 suid unicode"
+
+DEPEND=">=sys-libs/ncurses-5.2-r1"
+
+pkg_setup() {
+ if use unicode && ! built_with_use sys-libs/ncurses unicode; then
+ eerror "sys-libs/ncurses must be build with unicode"
+ die "${PN} requires sys-libs/ncurses with USE=unicode"
+ fi
+}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-add-devnames.patch
+ epatch "${FILESDIR}"/${P}-linux-headers.patch
+ use unicode && epatch "${FILESDIR}/${P}-ncursesw.patch" #152883
+ epatch "${FILESDIR}/${P}-setlocale.patch"
+ epatch "${FILESDIR}"/${P}-headerfix.patch #128965
+ epatch "${FILESDIR}"/${P}-vlan.patch
+
+ sed -i \
+ -e 's:/var/local/iptraf:/var/lib/iptraf:g' \
+ -e "s:Documentation/:/usr/share/doc/${PF}:g" \
+ Documentation/*.* || die "sed doc paths"
+
+ if use ipv6 ; then
+ epatch "${DISTDIR}"/${P}-ipv6.patch.bz2
+
+ # bug 126479
+ if has_version '>=sys-libs/glibc-2.4' ; then
+ epatch "${FILESDIR}"/${P}-ipv6-glibc24.patch
+ fi
+
+ # bug 128965
+ epatch "${FILESDIR}"/${P}-ipv6-headerfix.patch
+ fi
+}
+
+src_compile() {
+ if use suid ; then
+ append-flags -DALLOWUSERS
+ fi
+ emake -C src CFLAGS="$CFLAGS" CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dosbin src/{iptraf,rawtime,rvnamed} || die
+ dodoc FAQ README* CHANGES RELEASE-NOTES
+ doman Documentation/*.8
+ dohtml -r Documentation/*
+ keepdir /var/{lib,run,log}/iptraf
+}
+
+pkg_postinst() {
+ if use suid ; then
+ elog
+ elog "You've chosen to build iptraf with run-as-user support"
+ elog
+ elog "The app now has this support, but for security reasons"
+ elog "you need to run the following command to allow your users"
+ elog "to suid-run it:"
+ elog
+ elog " # chmod 4755 /usr/sbin/iptraf"
+ elog
+ fi
+}