aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/netsniff-ng/Manifest1
-rw-r--r--net-analyzer/netsniff-ng/metadata.xml11
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-0.6.8.ebuild89
3 files changed, 101 insertions, 0 deletions
diff --git a/net-analyzer/netsniff-ng/Manifest b/net-analyzer/netsniff-ng/Manifest
new file mode 100644
index 000000000..598463ad4
--- /dev/null
+++ b/net-analyzer/netsniff-ng/Manifest
@@ -0,0 +1 @@
+DIST netsniff-ng-0.6.8.tar.xz 617820 BLAKE2B 1810b505e1bb2d973820629be30bd37de87f6c49b5c044c7ee6e7e5eb983c2e8b80f6ad772a7b42d315502dfdd92143cf1cd340101c91b074cba1ad53c9f40ea SHA512 5cb0e66ea399068a7017a77612165fca94509176e0b4d3bac146e4bd73e09682cb1ee82c276b842263497fa74d8875dbda0e6c63b5b5ffe76531c1f43cf9bb99
diff --git a/net-analyzer/netsniff-ng/metadata.xml b/net-analyzer/netsniff-ng/metadata.xml
new file mode 100644
index 000000000..d93287ed0
--- /dev/null
+++ b/net-analyzer/netsniff-ng/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zhuyifei1999@gmail.com</email>
+ <name>YiFei Zhu</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">borkmann/netsniff-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.6.8.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.6.8.ebuild
new file mode 100644
index 000000000..a013c30f4
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.6.8.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/borkmann/${PN}.git"
+else
+ SRC_URI="http://pub.${PN}.org/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug geoip zlib"
+
+RDEPEND="
+ dev-libs/libcli:=
+ dev-libs/libnl:3
+ dev-libs/userspace-rcu:=
+ net-libs/libnet:1.1
+ net-libs/libnetfilter_conntrack
+ net-libs/libpcap
+ sys-libs/ncurses:0=
+ geoip? ( dev-libs/geoip )
+ zlib? ( sys-libs/zlib:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/flex
+ sys-devel/bison
+ dev-libs/libsodium
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ default
+
+ sed -e '/CFLAGS/s:?=:+=:' \
+ -e '/CPPFLAGS/s:?=:+=:' \
+ -e '/CFLAGS/s:\(-g\|-O2\|-O3\|-m\(arch\|tune\)=native\)::g' \
+ -i Makefile || die
+
+ if ! grep -Fq nacl-20110221 curvetun/nacl_build.sh ; then
+ die "have nacl-20110221, expected $(grep ${MY_NACL_P} curvetun/nacl_build.sh)"
+ fi
+
+ export NACL_INC_DIR="${EPREFIX}/usr/include/nacl"
+ export NACL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/nacl"
+
+ # do not compress man pages by default
+ sed \
+ -e '/gzip/s@\$(Q).*$@$(Q)cp $(1).8 $(1)/$(1).8@' \
+ -e 's@\.8\.gz@.8@' \
+ -i Template || die
+
+ # fix build ordering in parallel make
+ sed -e 's/^trafgen_post_install:$/trafgen_post_install: trafgen_do_install/' \
+ -i trafgen/Makefile || die
+}
+
+src_configure() {
+ local myconfargs=(
+ --prefix="${EPREFIX}/usr"
+ --sysconfdir="${EPREFIX}/etc"
+ $(usex debug --enable-debug '')
+ $(usex geoip '' --disable-geoip)
+ $(usex zlib '' --disable-zlib)
+ )
+ # not an autoconf generated configure
+ ./configure "${myconfargs[@]}" || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getCC)" CCACHE="" \
+ LEX=lex YAAC=bison STRIP=true \
+ Q= HARDENING=1
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" ETCDIR="${ED}/etc" install
+
+ dodoc AUTHORS README REPORTING-BUGS
+}