openbsd-ports/net/py-libpcap/patches/patch-Makefile
shell 725730bceb 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/
2001-09-20 11:38:24 +00:00

38 lines
1.1 KiB
Plaintext

$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
-