/[gentoo-x86]/net-analyzer/tcpdump/tcpdump-4.2.0.ebuild
Gentoo

Contents of /net-analyzer/tcpdump/tcpdump-4.2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jun 12 03:32:07 2012 UTC (2 years, 5 months ago) by zmedico
Branch: MAIN
Changes since 1.2: +3 -3 lines
inherit user for enewgroup and enewuser

(Portage version: 2.2.0_alpha110_p25/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.2.0.ebuild,v 1.2 2011/12/17 14:22:46 jer Exp $
4
5 EAPI="4"
6 inherit eutils flag-o-matic user
7
8 DESCRIPTION="A Tool for network monitoring and data acquisition"
9 HOMEPAGE="http://www.tcpdump.org/"
10 SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
11 http://www.jp.tcpdump.org/release/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
16 IUSE="+chroot smi ssl ipv6 -samba suid test"
17
18 RDEPEND="
19 net-libs/libpcap
20 smi? ( net-libs/libsmi )
21 ssl? ( >=dev-libs/openssl-0.9.6m )
22 "
23 DEPEND="
24 ${RDEPEND}
25 test? (
26 || ( app-arch/sharutils sys-freebsd/freebsd-ubin )
27 dev-lang/perl
28 )
29 "
30
31 pkg_setup() {
32 if use samba ; then
33 ewarn
34 ewarn "CAUTION !!! CAUTION !!! CAUTION"
35 ewarn
36 ewarn "You're about to compile tcpdump with samba printing support"
37 ewarn "Upstream tags it as 'possibly-buggy SMB printer'"
38 ewarn "So think twice whether this is fine with you"
39 ewarn
40 ewarn "CAUTION !!! CAUTION !!! CAUTION"
41 ewarn
42 fi
43 enewgroup tcpdump
44 enewuser tcpdump -1 -1 -1 tcpdump
45 }
46
47 src_prepare() {
48 # http://sourceforge.net/tracker/?func=detail&aid=3444149&group_id=53066&atid=469573
49 # bug #393085
50 cp "${FILESDIR}"/${P}-ppi.h "${S}/ppi.h" || die
51 epatch "${FILESDIR}"/${P}-ipv6.patch
52 }
53
54 src_configure() {
55 # tcpdump needs some optymalization. see bug #108391
56 ( ! is-flag -O? || is-flag -O0 ) && append-flags -O2
57
58 replace-flags -O[3-9] -O2
59 filter-flags -finline-functions
60
61 econf --with-user=tcpdump \
62 $(use_with ssl crypto) \
63 $(use_with smi) \
64 $(use_enable ipv6) \
65 $(use_enable samba smb) \
66 $(use_with chroot chroot /var/lib/tcpdump)
67 }
68
69 src_test() {
70 sed '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST
71 emake check
72 }
73
74 src_install() {
75 dosbin tcpdump
76 doman tcpdump.1
77 dodoc *.awk
78 dodoc CHANGES CREDITS README
79
80 if use chroot; then
81 keepdir /var/lib/tcpdump
82 fperms 700 /var/lib/tcpdump
83 fowners tcpdump:tcpdump /var/lib/tcpdump
84 fi
85 if use suid; then
86 fowners root:tcpdump /usr/sbin/tcpdump
87 fperms 4110 /usr/sbin/tcpdump
88 fi
89 }
90
91 pkg_postinst() {
92 use suid && elog "To let normal users run tcpdump add them into tcpdump group."
93 }

  ViewVC Help
Powered by ViewVC 1.1.20