From a6cc4f0b68202bda2092acb7e7d1edbe2ddd899f Mon Sep 17 00:00:00 2001 From: alarig Date: Wed, 26 Feb 2020 23:59:38 +0100 Subject: [PATCH] net-analyzer/netsniff-ng: New ebuild --- net-analyzer/netsniff-ng/Manifest | 1 + net-analyzer/netsniff-ng/metadata.xml | 12 +++ .../netsniff-ng/netsniff-ng-0.6.6.ebuild | 85 +++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 net-analyzer/netsniff-ng/Manifest create mode 100644 net-analyzer/netsniff-ng/metadata.xml create mode 100644 net-analyzer/netsniff-ng/netsniff-ng-0.6.6.ebuild diff --git a/net-analyzer/netsniff-ng/Manifest b/net-analyzer/netsniff-ng/Manifest new file mode 100644 index 0000000..66312eb --- /dev/null +++ b/net-analyzer/netsniff-ng/Manifest @@ -0,0 +1 @@ +DIST netsniff-ng-0.6.6.tar.xz 617204 BLAKE2B 9b8f018fa1ec53f211f9540fe1dff10e15ce615ab2c39b05917b5ddb0b87058f7aac6bff10a098371544a2e7706cc515fd0b25609db9cd10f6b8a689b70702e6 SHA512 f6d158e61c5be72506e2732e82e3863b24115abcb4642c5998b7225475c07d8566ff124f6e204e5a1919a57aef1d34ebf234076c16d99299847f8204777eb834 diff --git a/net-analyzer/netsniff-ng/metadata.xml b/net-analyzer/netsniff-ng/metadata.xml new file mode 100644 index 0000000..678ca7a --- /dev/null +++ b/net-analyzer/netsniff-ng/metadata.xml @@ -0,0 +1,12 @@ + + + + + alarig@swordarmor.fr + Alarig Le Lay + + + proxy-maint@gentoo.org + Proxy Maintainers + + diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.6.6.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.6.6.ebuild new file mode 100644 index 0000000..562f650 --- /dev/null +++ b/net-analyzer/netsniff-ng/netsniff-ng-0.6.6.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib 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="${EROOT}/usr/include/nacl" + export NACL_LIB_DIR="${EROOT}/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 +} + +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 +}