diff options
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/py-pcap/Makefile | 49 | ||||
-rw-r--r-- | net/py-pcap/distinfo | 1 | ||||
-rw-r--r-- | net/py-pcap/pkg-comment | 1 | ||||
-rw-r--r-- | net/py-pcap/pkg-descr | 4 | ||||
-rw-r--r-- | net/py-pcap/pkg-plist | 6 |
6 files changed, 62 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 77b1ff251e04..b3ea6316c39c 100644 --- a/net/Makefile +++ b/net/Makefile @@ -347,6 +347,7 @@ SUBDIR += punkbuster-data SUBDIR += pvm SUBDIR += pvm++ + SUBDIR += py-pcap SUBDIR += py-soap SUBDIR += py-xmlrpc SUBDIR += py-xmlrpclib diff --git a/net/py-pcap/Makefile b/net/py-pcap/Makefile new file mode 100644 index 000000000000..a567f4e5d3c0 --- /dev/null +++ b/net/py-pcap/Makefile @@ -0,0 +1,49 @@ +# New ports collection makefile for: py-pcap +# Date created: 24 Nov 2001 +# Whom: Hye-Shik Chang <perky@fallin.lv> +# +# $FreeBSD$ +# + +PORTNAME= pcap +PORTVERSION= 0.2 +CATEGORIES= net python +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= pylibpcap +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= pylibpcap-${PORTVERSION} +DIST_SUBDIR= python + +MAINTAINER= perky@fallin.lv + +BUILD_DEPENDS= ${SWIG_CMD}:${PORTSDIR}/devel/SWIG + +EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} +PLIST_SUB= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S|^${LOCALBASE}/||g} +SWIG_CMD?= ${LOCALBASE}/bin/swig +WRKSRC= ${WRKDIR}/pylibpcap +USE_PYTHON= yes + +post-patch: + ${SED} -e 's|^\(PYTHON_INCLUDES=\).*|\1-I${PYTHON_INCLUDEDIR}|g' \ + -e 's|^\(SWIG=\).*|\1${SWIG_CMD}|g' \ + ${WRKSRC}/Makefile > ${WRKSRC}/Makefile.temp && \ + ${MV} -f ${WRKSRC}/Makefile.temp ${WRKSRC}/Makefile + ${SED} -e 's|pcap/pcap\.h|pcap.h|g' \ + ${WRKSRC}/pypcap.h > ${WRKSRC}/pypcap.h.temp && \ + ${MV} -f ${WRKSRC}/pypcap.h.temp ${WRKSRC}/pypcap.h + +post-build: + ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC} + ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC} + +do-install: +.for f in pcapcmodule.so pcap.py pcap.pyc pcap.pyo + ${INSTALL_DATA} ${WRKSRC}/$f ${PYTHON_SITELIBDIR} +.endfor +.if !defined(NOPORTDOCS) + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/sniff.py ${EXAMPLESDIR} +.endif + +.include <bsd.port.mk> diff --git a/net/py-pcap/distinfo b/net/py-pcap/distinfo new file mode 100644 index 000000000000..caeeb103a9e7 --- /dev/null +++ b/net/py-pcap/distinfo @@ -0,0 +1 @@ +MD5 (python/pylibpcap-0.2.tar.gz) = f0e9fec4cd90305674ab1d4187f30a9e diff --git a/net/py-pcap/pkg-comment b/net/py-pcap/pkg-comment new file mode 100644 index 000000000000..d14f9f8d8ecb --- /dev/null +++ b/net/py-pcap/pkg-comment @@ -0,0 +1 @@ +Python interface to LBL Packet Capture library (libpcap) diff --git a/net/py-pcap/pkg-descr b/net/py-pcap/pkg-descr new file mode 100644 index 000000000000..576b4f69bcb7 --- /dev/null +++ b/net/py-pcap/pkg-descr @@ -0,0 +1,4 @@ +Python module for the libpcap packet capture library, +based on the original python libpcap module by Aaron Rhodes. + +WWW: http://sourceforge.net/projects/pylibpcap/ diff --git a/net/py-pcap/pkg-plist b/net/py-pcap/pkg-plist new file mode 100644 index 000000000000..42fce3725b6d --- /dev/null +++ b/net/py-pcap/pkg-plist @@ -0,0 +1,6 @@ +%%PYTHON_SITELIBDIR%%/pcap.py +%%PYTHON_SITELIBDIR%%/pcap.pyc +%%PYTHON_SITELIBDIR%%/pcap.pyo +%%PYTHON_SITELIBDIR%%/pcapcmodule.so +%%PORTDOCS%%share/examples/py-pcap/sniff.py +%%PORTDOCS%%@dirrm share/examples/py-pcap |