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

Contents of /net-analyzer/tcpdump/tcpdump-3.9.8-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Tue Jun 12 03:32:07 2012 UTC (2 years, 1 month ago) by zmedico
Branch: MAIN
Changes since 1.8: +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-3.9.8-r1.ebuild,v 1.8 2010/02/12 14:34:14 jer Exp $
4
5 inherit flag-o-matic toolchain-funcs eutils user
6
7 DESCRIPTION="A Tool for network monitoring and data acquisition"
8 HOMEPAGE="http://www.tcpdump.org/"
9 SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
10 http://www.jp.tcpdump.org/release/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
15 IUSE="chroot ssl ipv6 samba"
16
17 DEPEND="net-libs/libpcap
18 ssl? ( >=dev-libs/openssl-0.9.6m )"
19 RDEPEND="${DEPEND}"
20
21 group_user_check() {
22 einfo "Checking for tcpdump group ..."
23 enewgroup tcpdump
24 einfo "Checking for tcpdump user ..."
25 enewuser tcpdump -1 -1 -1 tcpdump
26 }
27
28 pkg_setup() {
29 if use samba ; then
30 ewarn
31 ewarn "CAUTION !!! CAUTION !!! CAUTION"
32 ewarn
33 ewarn "You're about to compile tcpdump with samba printing support"
34 ewarn "Upstream tags it as 'possibly-buggy SMB printer'"
35 ewarn "So think twice whether this is fine with you"
36 ewarn
37 ewarn "CAUTION !!! CAUTION !!! CAUTION"
38 ewarn
39 ewarn "(Giving you 10 secs to think about it)"
40 ewarn
41 ebeep 5
42 epause 5
43 fi
44 group_user_check
45 }
46
47 src_compile() {
48 # tcpdump needs some optymalization. see bug #108391
49 ( ! is-flag -O? || is-flag -O0 ) && append-flags -O
50
51 replace-flags -O[3-9] -O2
52 filter-flags -finline-functions
53
54 # Fix wrt bug #48747
55 if [[ $(gcc-major-version) -gt 3 ]] || \
56 [[ $(gcc-major-version) -eq 3 && $(gcc-minor-version) -ge 4 ]]
57 then
58 filter-flags -funit-at-a-time
59 append-flags -fno-unit-at-a-time
60 fi
61
62 local myconf
63 if ! use ssl ; then
64 myconf="--without-crypto"
65 fi
66
67 if use chroot; then
68 myconf="${myconf} --with-chroot=/var/lib/tcpdump"
69 fi
70
71 econf --with-user=tcpdump \
72 $(use_enable ipv6) \
73 $(use_enable samba smb) \
74 ${myconf} || die "configure failed"
75
76 make CCOPT="$CFLAGS" || die "make failed"
77 }
78
79 pkg_preinst() {
80 group_user_check
81 }
82
83 src_install() {
84 dosbin tcpdump
85 doman tcpdump.1
86 dodoc *.awk
87 dodoc README FILES VERSION CHANGES CREDITS TODO
88
89 keepdir /var/lib/tcpdump
90 fperms 700 /var/lib/tcpdump
91 fowners tcpdump:tcpdump /var/lib/tcpdump
92 }

  ViewVC Help
Powered by ViewVC 1.1.20