git: 0f9142697a9a - main - net/pcapy-ng: Add new port

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Thu, 31 Mar 2022 07:35:50 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0f9142697a9a0b9e9547eb2ae8be3b2ce536f400

commit 0f9142697a9a0b9e9547eb2ae8be3b2ce536f400
Author:     Michael Muenz <m.muenz@gmail.com>
AuthorDate: 2022-03-30 12:33:10 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-03-31 07:33:17 +0000

    net/pcapy-ng: Add new port
    
    Pcapy is a Python extension module that interfaces with the libpcap packet
    capture library. Pcapy enables Python scripts to capture packets on the network.
    
    Pcapy is highly effective when used in conjunction with a packet-handling
    package such as Impacket, which is a collection of Python classes for
    constructing and dissecting network packets.
    
    WWW: https://github.com/CoreSecurity/pcapy
    WWW: http://www.coresecurity.com/corelabs-research/open-source-tools/pcapy
    
    PR:             260732
---
 net/Makefile              |  1 +
 net/py-pcapy-ng/Makefile  | 32 ++++++++++++++++++++++++++++++++
 net/py-pcapy-ng/distinfo  |  3 +++
 net/py-pcapy-ng/pkg-descr |  9 +++++++++
 4 files changed, 45 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index e9d2fb867e76..8c2b9d32b926 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1073,6 +1073,7 @@
     SUBDIR += py-paho-mqtt
     SUBDIR += py-pamqp
     SUBDIR += py-pcapy
+    SUBDIR += py-pcapy-ng
     SUBDIR += py-port-for
     SUBDIR += py-portend
     SUBDIR += py-pyenet
diff --git a/net/py-pcapy-ng/Makefile b/net/py-pcapy-ng/Makefile
new file mode 100644
index 000000000000..cae0df816271
--- /dev/null
+++ b/net/py-pcapy-ng/Makefile
@@ -0,0 +1,32 @@
+# Created by: Michael Muenz <m.muenz@gmail.com>
+
+PORTNAME=	pcapy-ng
+PORTVERSION=	1.0.4
+CATEGORIES=	net python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	m.muenz@gmail.com
+COMMENT=	Python pcap extension
+
+LICENSE=	APACHE11
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist distutils
+
+CONFLICTS_INSTALL=	pcapy
+
+DOCSDIR=	${PREFIX}/share/doc/py-${PORTNAME}
+PORTDOCS=	README pcapy.html
+
+OPTIONS_DEFINE=	DOCS
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pcapy*.so
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/net/py-pcapy-ng/distinfo b/net/py-pcapy-ng/distinfo
new file mode 100644
index 000000000000..c4bbecec0304
--- /dev/null
+++ b/net/py-pcapy-ng/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1640604068
+SHA256 (pcapy-ng-1.0.4.tar.gz) = b272a90c8488e765a33128e903e2ade41c9b65f7b95ee3aa9a8ddc69efd9dc53
+SIZE (pcapy-ng-1.0.4.tar.gz) = 38617
diff --git a/net/py-pcapy-ng/pkg-descr b/net/py-pcapy-ng/pkg-descr
new file mode 100644
index 000000000000..086efd251d0b
--- /dev/null
+++ b/net/py-pcapy-ng/pkg-descr
@@ -0,0 +1,9 @@
+Pcapy is a Python extension module that interfaces with the libpcap packet
+capture library. Pcapy enables Python scripts to capture packets on the network.
+
+Pcapy is highly effective when used in conjunction with a packet-handling
+package such as Impacket, which is a collection of Python classes for
+constructing and dissecting network packets.
+
+WWW: https://github.com/CoreSecurity/pcapy
+WWW: http://www.coresecurity.com/corelabs-research/open-source-tools/pcapy