1 |
commit: b4f2c5c59c7e6356c8e04df6d09cf620c94949ca |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 22 13:24:05 2016 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 22 13:24:18 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4f2c5c5 |
7 |
|
8 |
Do not filter out -finline-functions and -O[^2] (bug #594762 by Jan Chren). |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
net-analyzer/tcpdump/tcpdump-4.8.0-r1.ebuild | 91 ++++++++++++++++++++++++++++ |
13 |
1 file changed, 91 insertions(+) |
14 |
|
15 |
diff --git a/net-analyzer/tcpdump/tcpdump-4.8.0-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.8.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..2dfe549 |
18 |
--- /dev/null |
19 |
+++ b/net-analyzer/tcpdump/tcpdump-4.8.0-r1.ebuild |
20 |
@@ -0,0 +1,91 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+inherit flag-o-matic toolchain-funcs user |
27 |
+ |
28 |
+DESCRIPTION="A Tool for network monitoring and data acquisition" |
29 |
+HOMEPAGE="http://www.tcpdump.org/" |
30 |
+SRC_URI=" |
31 |
+ https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz |
32 |
+" |
33 |
+ |
34 |
+LICENSE="BSD" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux" |
37 |
+IUSE="+drop-root libressl smi ssl samba suid test" |
38 |
+ |
39 |
+RDEPEND=" |
40 |
+ drop-root? ( sys-libs/libcap-ng ) |
41 |
+ net-libs/libpcap |
42 |
+ smi? ( net-libs/libsmi ) |
43 |
+ ssl? ( |
44 |
+ !libressl? ( >=dev-libs/openssl-0.9.6m:0 ) |
45 |
+ libressl? ( dev-libs/libressl ) |
46 |
+ ) |
47 |
+" |
48 |
+DEPEND=" |
49 |
+ ${RDEPEND} |
50 |
+ drop-root? ( virtual/pkgconfig ) |
51 |
+ test? ( |
52 |
+ || ( app-arch/sharutils sys-freebsd/freebsd-ubin ) |
53 |
+ dev-lang/perl |
54 |
+ ) |
55 |
+" |
56 |
+ |
57 |
+S=${WORKDIR}/${PN}-${P} |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ if use drop-root || use suid; then |
61 |
+ enewgroup tcpdump |
62 |
+ enewuser tcpdump -1 -1 -1 tcpdump |
63 |
+ fi |
64 |
+} |
65 |
+ |
66 |
+src_configure() { |
67 |
+ if use drop-root; then |
68 |
+ append-cppflags -DHAVE_CAP_NG_H |
69 |
+ export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) |
70 |
+ fi |
71 |
+ |
72 |
+ econf \ |
73 |
+ $(use_enable samba smb) \ |
74 |
+ $(use_with drop-root chroot '') \ |
75 |
+ $(use_with smi) \ |
76 |
+ $(use_with ssl crypto "${EPREFIX}/usr") \ |
77 |
+ $(usex drop-root "--with-user=tcpdump" "") |
78 |
+} |
79 |
+ |
80 |
+src_test() { |
81 |
+ if [[ ${EUID} -ne 0 ]] || ! use drop-root; then |
82 |
+ sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die |
83 |
+ emake check |
84 |
+ else |
85 |
+ ewarn "If you want to run the test suite, make sure you either" |
86 |
+ ewarn "set FEATURES=userpriv or set USE=-drop-root" |
87 |
+ fi |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ dosbin tcpdump |
92 |
+ doman tcpdump.1 |
93 |
+ dodoc *.awk |
94 |
+ dodoc CHANGES CREDITS README.md |
95 |
+ |
96 |
+ if use suid; then |
97 |
+ fowners root:tcpdump /usr/sbin/tcpdump |
98 |
+ fperms 4110 /usr/sbin/tcpdump |
99 |
+ fi |
100 |
+} |
101 |
+ |
102 |
+pkg_preinst() { |
103 |
+ if use drop-root || use suid; then |
104 |
+ enewgroup tcpdump |
105 |
+ enewuser tcpdump -1 -1 -1 tcpdump |
106 |
+ fi |
107 |
+} |
108 |
+ |
109 |
+pkg_postinst() { |
110 |
+ use suid && elog "To let normal users run tcpdump add them into tcpdump group." |
111 |
+} |