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

Contents of /net-analyzer/tcpdump/tcpdump-4.2.1.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, 1 month ago) by zmedico
Branch: MAIN
Changes since 1.2: +2 -2 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.1.ebuild,v 1.2 2012/04/23 07:15:17 heroxbd Exp $
4
5 EAPI="4"
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="
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_configure() {
48 # tcpdump needs some optymalization. see bug #108391
49 ( ! is-flag -O? || is-flag -O0 ) && append-flags -O2
50
51 replace-flags -O[3-9] -O2
52 filter-flags -finline-functions
53
54 econf \
55 --with-user=tcpdump \
56 $(use_with ssl crypto "${EPREFIX}/usr") \
57 $(use_with smi) \
58 $(use_enable ipv6) \
59 $(use_enable samba smb) \
60 $(use_with chroot chroot "${EPREFIX}/var/lib/tcpdump")
61 }
62
63 src_test() {
64 sed '/^\(espudp1\|eapon1\)/d;' -i tests/TESTLIST
65 emake check
66 }
67
68 src_install() {
69 dosbin tcpdump
70 doman tcpdump.1
71 dodoc *.awk
72 dodoc CHANGES CREDITS README
73
74 if use chroot; then
75 keepdir /var/lib/tcpdump
76 fperms 700 /var/lib/tcpdump
77 fowners tcpdump:tcpdump /var/lib/tcpdump
78 fi
79 if use suid; then
80 fowners root:tcpdump /usr/sbin/tcpdump
81 fperms 4110 /usr/sbin/tcpdump
82 fi
83 }
84
85 pkg_postinst() {
86 use suid && elog "To let normal users run tcpdump add them into tcpdump group."
87 }

  ViewVC Help
Powered by ViewVC 1.1.20