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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Jun 12 03:32:07 2012 UTC (2 years, 4 months ago) by zmedico
Branch: MAIN
Changes since 1.5: +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.1.1.ebuild,v 1.5 2011/11/10 13:22:19 naota Exp $
4
5 EAPI="2"
6 inherit 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="net-libs/libpcap
19 smi? ( net-libs/libsmi )
20 ssl? ( >=dev-libs/openssl-0.9.6m )"
21 DEPEND="${RDEPEND}
22 test? ( || ( app-arch/sharutils sys-freebsd/freebsd-ubin )
23 dev-lang/perl )"
24
25 pkg_setup() {
26 if use samba ; then
27 ewarn
28 ewarn "CAUTION !!! CAUTION !!! CAUTION"
29 ewarn
30 ewarn "You're about to compile tcpdump with samba printing support"
31 ewarn "Upstream tags it as 'possibly-buggy SMB printer'"
32 ewarn "So think twice whether this is fine with you"
33 ewarn
34 ewarn "CAUTION !!! CAUTION !!! CAUTION"
35 ewarn
36 fi
37 enewgroup tcpdump
38 enewuser tcpdump -1 -1 -1 tcpdump
39 }
40
41 src_configure() {
42 # tcpdump needs some optymalization. see bug #108391
43 ( ! is-flag -O? || is-flag -O0 ) && append-flags -O2
44
45 replace-flags -O[3-9] -O2
46 filter-flags -finline-functions
47
48 econf --with-user=tcpdump \
49 $(use_with ssl crypto) \
50 $(use_with smi) \
51 $(use_enable ipv6) \
52 $(use_enable samba smb) \
53 $(use_with chroot chroot /var/lib/tcpdump)
54 }
55
56 src_compile() {
57 make CCOPT="$CFLAGS" || die "make failed"
58 }
59
60 src_test() {
61 sed '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST
62 make check || die "tests failed"
63 }
64
65 src_install() {
66 dosbin tcpdump || die
67 doman tcpdump.1 || die
68 dodoc *.awk || die
69 dodoc CHANGES CREDITS README || die
70
71 if use chroot; then
72 keepdir /var/lib/tcpdump
73 fperms 700 /var/lib/tcpdump
74 fowners tcpdump:tcpdump /var/lib/tcpdump
75 fi
76 if use suid; then
77 fowners root:tcpdump /usr/sbin/tcpdump
78 fperms 4110 /usr/sbin/tcpdump
79 fi
80 }
81
82 pkg_postinst() {
83 use suid && elog "To let normal users run tcpdump add them into tcpdump group."
84 }

  ViewVC Help
Powered by ViewVC 1.1.20