aboutsummaryrefslogtreecommitdiff
path: root/net/scapy/Makefile
blob: 9636410b703c6e1d3313a5ce4af22e314e92f9a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# New ports collection makefile for:	scapy
# Date created:		08 dec 2005
# Whom:			vanhu <vanhu@netasq.com>
#
# $FreeBSD$
#
# TODO: - configurable --enable-xxx for various additional dependancies

PORTNAME=	scapy
PORTVERSION=	2.2.0
CATEGORIES=	net
MASTER_SITES=	http://secdev.org/projects/scapy/files/

MAINTAINER=	vanhu@netasq.com
COMMENT=	Powerful interactive packet manipulation program in python

RUN_DEPENDS=	${PYTHON_SITELIBDIR}/dnet.so:${PORTSDIR}/net/py-libdnet \
		${PYTHON_SITELIBDIR}/pcap.py:${PORTSDIR}/net/py-pcap

MAN1=		scapy.1
MANCOMPRESSED=	yes

USE_PYTHON=	2.5+
USE_PYDISTUTILS=yes

OPTIONS=	PYX "Support for PostScript and PDF graphs drawing" off \
		PYCRYPTO "Support for py-crypto for WEP decoding" off \
		PYGNUPLOT "Support for py-gnuplot wrapper to plot graphs" off \
		GRAPH	"Support for graph generation and visualization" off \
		P0F_BASE "Support for p0f OS signatures database" off \
		QUESO_BASE "Support for queso OS signatures database" off \
		NMAP "Support for nmap OS signatures database" off \
		MANUF "Support for wireshark's MANUF MAC database" off \
		VPYTHON "Support for 3D representation of traceroute" off \
		SOX "Support for VoIP" off

.include <bsd.port.pre.mk>

.if defined(WITH_PYX)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/pyx/__init__.py:${PORTSDIR}/graphics/py-PyX
.endif

.if defined(WITH_PYCRYPTO)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/Crypto/__init__.py:${PORTSDIR}/security/py-pycrypto
.endif

.if defined(WITH_PYGNUPLOT)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/Gnuplot/__init__.py:${PORTSDIR}/math/py-gnuplot
.endif

.if defined(WITH_GRAPH)
RUN_DEPENDS+=	${LOCALBASE}/bin/MagickCore-config:${PORTSDIR}/graphics/ImageMagick
RUN_DEPENDS+=	${LOCALBASE}/bin/dot:${PORTSDIR}/graphics/graphviz
.endif

.if defined(WITH_P0F_BASE)
RUN_DEPENDS+=	${LOCALBASE}/etc/p0f/p0f.fp:${PORTSDIR}/net-mgmt/p0f
.endif

.if defined(WITH_QUESO_BASE)
RUN_DEPENDS+=	${LOCALBASE}/etc/queso.conf.sample:${PORTSDIR}/net/queso
.endif

.if defined(WITH_NMAP)
RUN_DEPENDS+=	${LOCALBASE}/share/nmap/nmap-os-db:${PORTSDIR}/security/nmap
.endif

.if defined(WITH_MANUF)
RUN_DEPENDS+=	${LOCALBASE}/share/wireshark/manuf:${PORTSDIR}/net/wireshark
.endif

.if defined(WITH_VPYTHON)
RUN_DEPENDS+=	${LOCALBASE}/bin/vpython:${PORTSDIR}/graphics/py-visual
.endif

.if defined(WITH_SOX)
RUN_DEPENDS+=	${LOCALBASE}/bin/sox:${PORTSDIR}/audio/sox
.endif

post-patch:
	@${REINPLACE_CMD} "s,share/man/man1,man/man1," ${WRKSRC}/setup.py
	@${REINPLACE_CMD} "s,/usr/share/,${LOCALBASE}/share/," \
		${WRKSRC}/scapy/data.py ${WRKSRC}/scapy/utils6.py \
		${WRKSRC}/scapy/modules/nmap.py
	@${REINPLACE_CMD} "s,/etc/,${LOCALBASE}/etc/," \
		${WRKSRC}/scapy/modules/p0f.py ${WRKSRC}/scapy/modules/queso.py

.include <bsd.port.post.mk>