diff options
author | petef <petef@FreeBSD.org> | 2001-11-25 17:41:29 +0800 |
---|---|---|
committer | petef <petef@FreeBSD.org> | 2001-11-25 17:41:29 +0800 |
commit | f79ee0665903cba054b701954fcc60caef5a0e8b (patch) | |
tree | 69bf11662a69f8104682ea0864bb656014de6ea8 /net/py-pcap/Makefile | |
parent | 66d7beefea70cbb80a6ad63996d7e56151a03902 (diff) | |
download | freebsd-ports-gnome-f79ee0665903cba054b701954fcc60caef5a0e8b.tar.gz freebsd-ports-gnome-f79ee0665903cba054b701954fcc60caef5a0e8b.tar.zst freebsd-ports-gnome-f79ee0665903cba054b701954fcc60caef5a0e8b.zip |
Add py-pcap-0.2, a Python interface to LBL Packet Capture library (libpcap)
PR: 32240
Submitted by: Hye-Shik Chang <perky@fallin.lv>
Diffstat (limited to 'net/py-pcap/Makefile')
-rw-r--r-- | net/py-pcap/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
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> |