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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Tue Jan 22 05:47:34 2013 UTC (23 months ago) by vapier
Branch: MAIN
Changes since 1.8: +12 -3 lines
Fix from upstream for cross-compiling with ssl.

(Portage version: 2.2.0_alpha159/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

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

  ViewVC Help
Powered by ViewVC 1.1.20