Initial import of py-libpcap-0.2

Submitted and maintained by Maurice Nonnekes <maurice@amaze.nl>
---

libpcap is a packet capturing library. It is used by all sorts of
networking diagnostic programs (like tcpdump and nmap).

py-libpcap is an interface to this library for Python.

WWW: http://sourceforge.net/projects/pylibpcap/
This commit is contained in:
shell 2001-09-20 11:38:24 +00:00
parent 70e1f2cafc
commit 725730bceb
6 changed files with 94 additions and 0 deletions

32
net/py-libpcap/Makefile Normal file
View File

@ -0,0 +1,32 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/09/20 11:38:24 shell Exp $
COMMENT= "Python bindings for libpcap"
V= 0.2
DISTNAME= pylibpcap-${V}
PKGNAME= py-libpcap-${V}
CATEGORIES= net
NEED_VERSION= 1.457
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pylibpcap
HOMEPAGE= http://sourceforge.net/projects/pylibpcap/
MAINTAINER= Maurice Nonnekes <maurice@amaze.nl>
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PYTHON_VER= 2.1
SUBST_VARS= PYTHON_VER
MAKE_ENV= PYTHON_VER=${PYTHON_VER}
BUILD_DEPENDS+= swig::devel/swig
RUN_DEPENDS+= python${PYTHON_VER}::lang/python
WRKDIST= ${WRKDIR}/pylibpcap
.include <bsd.port.mk>

3
net/py-libpcap/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (pylibpcap-0.2.tar.gz) = f0e9fec4cd90305674ab1d4187f30a9e
RMD160 (pylibpcap-0.2.tar.gz) = eacbfdccc29f6f8ad626af4bad103995237ef93b
SHA1 (pylibpcap-0.2.tar.gz) = 655dfcbc7376ae8d661cf874d596c1acb78c02ae

View File

@ -0,0 +1,37 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2001/09/20 11:38:24 shell Exp $
--- Makefile.orig Sat Nov 4 03:04:07 2000
+++ Makefile Tue Sep 18 17:57:47 2001
@@ -1,23 +1,24 @@
-
-SWIG=/usr/local/bin/swig
-C=gcc -g
-PYTHON_INCLUDES=-I/usr/include/python1.5
-PCAP_INCLUDES=-I/usr/include/pcap
+SWIG=$(LOCALBASE)/bin/swig
+PYTHON_INCLUDES=-I$(LOCALBASE)/include/python$(PYTHON_VER)
OBJS= pcap.o exception.o error.o
all: pcapcmodule.so
pcapcmodule.so: pcap_wrap.o $(OBJS)
- $(CC) -shared pcap_wrap.o $(OBJS) -L../libpcap-0.4 -lpcap -o $@
-# $(CC) -shared pcap_wrap.o $(OBJS) -lpcap -o $@
+ $(CC) -shared pcap_wrap.o $(OBJS) -lpcap -o $@
+ @echo "import pcap" | python$(PYTHON_VER)
.c.o:
- $(CC) $(CFLAGS) $(PYTHON_INCLUDES) $(PCAP_INCLUDES) -c $<
+ $(CC) $(CFLAGS) $(PYTHON_INCLUDES) -c $<
pcap_wrap.c: pcap.i
$(SWIG) -python -shadow pcap.i
+install:
+ mkdir -p $(DESTDIR)/$(LOCALBASE)/lib/python$(PYTHON_VER)/site-packages
+ install -m 644 -o root -g bin pcap.py pcap.pyc pcapcmodule.so \
+ $(DESTDIR)/$(LOCALBASE)/lib/python$(PYTHON_VER)/site-packages/
+
clean:
rm -f *.o *.pyc pcap_wrap.* pcapcmodule.so core
-

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-pypcap_h,v 1.1.1.1 2001/09/20 11:38:24 shell Exp $
--- pypcap.h.orig Tue Sep 18 17:07:25 2001
+++ pypcap.h Tue Sep 18 17:07:36 2001
@@ -12,7 +12,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include <pcap/pcap.h>
+#include <pcap.h>
/* the pcap class */
typedef struct {

6
net/py-libpcap/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
libpcap is a packet capturing library. It is used by all sorts of
networking diagnostic programs (like tcpdump and nmap).
py-libpcap is an interface to this library for Python.
WWW: ${HOMEPAGE}

4
net/py-libpcap/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/09/20 11:38:24 shell Exp $
lib/python${PYTHON_VER}/site-packages/pcap.py
lib/python${PYTHON_VER}/site-packages/pcap.pyc
lib/python${PYTHON_VER}/site-packages/pcapcmodule.so