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