summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Krier <cedk@gentoo.org>2008-03-30 21:12:32 +0000
committerCédric Krier <cedk@gentoo.org>2008-03-30 21:12:32 +0000
commitda580e07157c4e4e92dd97027578997a26b5113d (patch)
tree29598f632cb9af679d6d05dd842b72c8d2c8c42a /net-analyzer
parentAdd chroot USE for net-analyzer/tcpdump (diff)
downloadgentoo-2-da580e07157c4e4e92dd97027578997a26b5113d.tar.gz
gentoo-2-da580e07157c4e4e92dd97027578997a26b5113d.tar.bz2
gentoo-2-da580e07157c4e4e92dd97027578997a26b5113d.zip
Add chroot USE for bug #199172
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/tcpdump/ChangeLog9
-rw-r--r--net-analyzer/tcpdump/tcpdump-3.9.8-r1.ebuild84
2 files changed, 91 insertions, 2 deletions
diff --git a/net-analyzer/tcpdump/ChangeLog b/net-analyzer/tcpdump/ChangeLog
index 940dadabdf98..9e6514f00dfa 100644
--- a/net-analyzer/tcpdump/ChangeLog
+++ b/net-analyzer/tcpdump/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-analyzer/tcpdump
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.126 2007/11/14 16:34:58 jer Exp $
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/ChangeLog,v 1.127 2008/03/30 21:12:32 cedk Exp $
+
+*tcpdump-3.9.8-r1 (30 Mar 2008)
+
+ 30 Mar 2008; Cédric Krier <cedk@gentoo.org> +tcpdump-3.9.8-r1.ebuild:
+ Add chroot USE for bug #199172
14 Nov 2007; Jeroen Roovers <jer@gentoo.org> tcpdump-3.9.8.ebuild:
Stable for HPPA (bug #198476).
diff --git a/net-analyzer/tcpdump/tcpdump-3.9.8-r1.ebuild b/net-analyzer/tcpdump/tcpdump-3.9.8-r1.ebuild
new file mode 100644
index 000000000000..6cb85629dd40
--- /dev/null
+++ b/net-analyzer/tcpdump/tcpdump-3.9.8-r1.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/tcpdump/tcpdump-3.9.8-r1.ebuild,v 1.1 2008/03/30 21:12:32 cedk Exp $
+
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="A Tool for network monitoring and data acquisition"
+HOMEPAGE="http://www.tcpdump.org/"
+SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
+ http://www.jp.tcpdump.org/release/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="chroot ssl ipv6 samba"
+
+DEPEND="net-libs/libpcap
+ ssl? ( >=dev-libs/openssl-0.9.6m )"
+
+pkg_setup() {
+ if use samba ; then
+ ewarn
+ ewarn "CAUTION !!! CAUTION !!! CAUTION"
+ ewarn
+ ewarn "You're about to compile tcpdump with samba printing support"
+ ewarn "Upstream tags it as 'possibly-buggy SMB printer'"
+ ewarn "So think twice whether this is fine with you"
+ ewarn
+ ewarn "CAUTION !!! CAUTION !!! CAUTION"
+ ewarn
+ ewarn "(Giving you 10 secs to think about it)"
+ ewarn
+ ebeep 5
+ epause 5
+ fi
+}
+
+src_compile() {
+ # tcpdump needs some optymalization. see bug #108391
+ ( ! is-flag -O? || is-flag -O0 ) && append-flags -O
+
+ replace-flags -O[3-9] -O2
+ filter-flags -finline-functions
+
+ # Fix wrt bug #48747
+ if [[ $(gcc-major-version) -gt 3 ]] || \
+ [[ $(gcc-major-version) -eq 3 && $(gcc-minor-version) -ge 4 ]]
+ then
+ filter-flags -funit-at-a-time
+ append-flags -fno-unit-at-a-time
+ fi
+
+ local myconf
+ if ! use ssl ; then
+ myconf="--without-crypto"
+ fi
+
+ if use chroot; then
+ myconf="${myconf} --with-chroot=/var/lib/tcpdump"
+ fi
+
+ econf --with-user=tcpdump \
+ $(use_enable ipv6) \
+ $(use_enable samba smb) \
+ ${myconf} || die "configure failed"
+
+ make CCOPT="$CFLAGS" || die "make failed"
+}
+
+pkg_preinst() {
+ enewgroup tcpdump || die "Failed to add group tcpdump"
+ enewuser tcpdump -1 -1 -1 tcpdump || die "Failed to add user tcpdump"
+}
+
+src_install() {
+ dosbin tcpdump
+ doman tcpdump.1
+ dodoc *.awk
+ dodoc README FILES VERSION CHANGES CREDITS TODO
+
+ keepdir /var/lib/tcpdump
+ fperms 700 /var/lib/tcpdump
+ fowners tcpdump:tcpdump /var/lib/tcpdump
+}