git: 4f5451e21d28 - main - net/nemesis: Re-add port: Command-line network packet crafting and injection utility

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 12 Jun 2022 07:40:18 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f5451e21d28a794ae0e7a84e58f011d4f1453a0

commit 4f5451e21d28a794ae0e7a84e58f011d4f1453a0
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-06-12 07:14:27 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-06-12 07:40:15 +0000

    net/nemesis: Re-add port: Command-line network packet crafting and injection utility
---
 MOVED                                             |  1 -
 net/Makefile                                      |  1 +
 net/nemesis/Makefile                              | 25 +++++++++++++++++++++++
 net/nemesis/distinfo                              |  3 +++
 net/nemesis/files/patch-src_nemesis-proto__igmp.c | 13 ++++++++++++
 net/nemesis/pkg-descr                             |  6 ++++++
 net/nemesis/pkg-plist                             | 13 ++++++++++++
 7 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index f13b36edff2f..fa8693e1eb85 100644
--- a/MOVED
+++ b/MOVED
@@ -6962,7 +6962,6 @@ net/libnet10||2014-09-30|Has expired: Superseded by net/libnet
 net/despoof||2014-09-30|Has expired: Depends on expired net/libnet10
 sysutils/gpkgdep||2014-09-30|Has expired: Requires old pkg_info
 security/vida||2014-09-30|Has expired: Depends on expired net/libnet10
-net/nemesis||2014-09-30|Has expired: Depends on expired net/libnet10
 net-mgmt/sing||2014-09-30|Has expired: Depends on expired net/libnet10
 net-mgmt/gps||2014-09-30|Has expired: Depends on expired net/libnet10
 net/ttlscan||2014-09-30|Has expired: Depends on expired net/libnet10
diff --git a/net/Makefile b/net/Makefile
index 540b76ec59fb..d7707737430e 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -492,6 +492,7 @@
     SUBDIR += ndpi
     SUBDIR += ndproxy
     SUBDIR += neatvnc
+    SUBDIR += nemesis
     SUBDIR += nepenthes
     SUBDIR += net6
     SUBDIR += netatalk3
diff --git a/net/nemesis/Makefile b/net/nemesis/Makefile
new file mode 100644
index 000000000000..164f532fa2b0
--- /dev/null
+++ b/net/nemesis/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	nemesis
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.8-5
+DISTVERSIONSUFFIX=	-gb1d398c
+CATEGORIES=	net
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Command-line network packet crafting and injection utility
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libnet.so:net/libnet
+
+USES=		autoreconf gmake localbase:ldflags
+
+GNU_CONFIGURE=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	libnet
+
+post-install:
+	@${RM} -r ${STAGEDIR}${DOCSDIR} # DOCSDIR doesn't have anything valuable
+
+.include <bsd.port.mk>
diff --git a/net/nemesis/distinfo b/net/nemesis/distinfo
new file mode 100644
index 000000000000..159a11aee5c4
--- /dev/null
+++ b/net/nemesis/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1655015499
+SHA256 (libnet-nemesis-v1.8-5-gb1d398c_GH0.tar.gz) = 117918465e96deed3ca05b9bb18eaba58a8fd55a01c3bba2647e77e0d19afdc0
+SIZE (libnet-nemesis-v1.8-5-gb1d398c_GH0.tar.gz) = 95116
diff --git a/net/nemesis/files/patch-src_nemesis-proto__igmp.c b/net/nemesis/files/patch-src_nemesis-proto__igmp.c
new file mode 100644
index 000000000000..14d4ac9064c4
--- /dev/null
+++ b/net/nemesis/files/patch-src_nemesis-proto__igmp.c
@@ -0,0 +1,13 @@
+- workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264625
+
+--- src/nemesis-proto_igmp.c.orig	2022-06-12 06:55:58 UTC
++++ src/nemesis-proto_igmp.c
+@@ -6,6 +6,8 @@
+  * nemesis-proto_igmp.c (IGMP Packet Generator)
+  */
+ 
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netinet/if_ether.h>
+ 
diff --git a/net/nemesis/pkg-descr b/net/nemesis/pkg-descr
new file mode 100644
index 000000000000..4d1975c4b739
--- /dev/null
+++ b/net/nemesis/pkg-descr
@@ -0,0 +1,6 @@
+The Nemesis Project is designed to be a command line based, portable
+human IP stack for UNIX-like and Windows systems. The suite is broken
+down by protocol, and should allow for useful scripting of injected
+packets from simple shell scripts.
+
+WWW: https://troglobit.com/projects/nemesis/
diff --git a/net/nemesis/pkg-plist b/net/nemesis/pkg-plist
new file mode 100644
index 000000000000..066f3ad11129
--- /dev/null
+++ b/net/nemesis/pkg-plist
@@ -0,0 +1,13 @@
+bin/nemesis
+man/man1/nemesis-arp.1.gz
+man/man1/nemesis-dhcp.1.gz
+man/man1/nemesis-dns.1.gz
+man/man1/nemesis-ethernet.1.gz
+man/man1/nemesis-icmp.1.gz
+man/man1/nemesis-igmp.1.gz
+man/man1/nemesis-ip.1.gz
+man/man1/nemesis-ospf.1.gz
+man/man1/nemesis-rip.1.gz
+man/man1/nemesis-tcp.1.gz
+man/man1/nemesis-udp.1.gz
+man/man1/nemesis.1.gz