aboutsummaryrefslogtreecommitdiff
path: root/security/nsm-console/Makefile
blob: 0e8f9480f42e602d346727d78f0235617f06b243 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# New ports collection makefile for:	nsm-console
# Date created:		2008-01-15
# Whom:			Tomoyuki Sakurai <cherry@trombik.org>
#
# $FreeBSD$
#

PORTNAME=	nsm-console
PORTVERSION=	0.7
CATEGORIES=	security
MASTER_SITES=	http://writequit.org/projects/nsm-console/files/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A framework for performing analysis on packet capture files

BROKEN=		does not fetch

USE_RUBY=	yes
NO_BUILD=	yes
RUBY_NO_BUILD_DEPENDS=	yes
WRKSRC=	${WRKDIR}/${PORTNAME}
OPTIONS=	TSHARK		"Install tshark" on \
			WIRESHARK	"Install wireshark" off \
			TCPDSTAT	"Install tcpdstat" on \
			NGREP		"Install ngrep" on \
			TCPFLOW 	"Install tcpflow" on \
			SNORT		"Install snort" on \
			TCPXTRACT	"Install tcpxtract" on \
			P0F			"Install p0f" on \
			PADS		"Install pads" on \
			FL0P		"Install fl0p" on \
			CHAOSREADER	"Install chaosreader" on \
			ARGUS		"Install argus" on \
			TCPICK		"Install tcpick" on \
			TCPTRACE	"Install tcptrace" on \
			FOREMOST	"Install foremost" on \
			CHAOSREADER	"Install chaosreader" on
NSM_DOC=	CHANGELOG TODO

.include <bsd.port.pre.mk>

.if defined(WITH_TSHARK)
RUN_DEPEND+=	${LOCALBASE}/bin/tshark:${PORTSDIR}/net/tshark
.endif
.if defined(WITH_WIRESHARK)
.if defined(WITH_TSHARK)
IGNORE=	you cannot enable both WIRESHARK and TSHARK
.else
RUN_DEPENDS+=	${LOCALBASE}/bin/wireshark:${PORTSDIR}/net/wireshark
.endif
.endif
.if defined(WITH_TCPDSTAT)
RUN_DEPENDS+=	${LOCALBASE}/bin/tcpdstat:${PORTSDIR}/net/tcpdstat
.endif
.if defined(WITH_NGREP)
RUN_DEPENDS+=	${LOCALBASE}/bin/ngrep:${PORTSDIR}/net/ngrep
.endif
.if defined(WITH_TCPFLOW)
RUN_DEPENDS+=	${LOCALBASE}/bin/tcpflow:${PORTSDIR}/net/tcpflow
.endif
.if defined(WITH_SNORT)
RUN_DEPENDS+=	${LOCALBASE}/bin/snort:${PORTSDIR}/security/snort
.endif
.if defined(WITH_TCPXTRACT)
RUN_DEPENDS+=	${LOCALBASE}/bin/tcpxtract:${PORTSDIR}/net/tcpxtract
.endif
.if defined(WITH_P0F)
RUN_DEPENDS+=	${LOCALBASE}/bin/p0f:${PORTSDIR}/net-mgmt/p0f
.endif
.if defined(WITH_PADS)
RUN_DEPENDS+=	${LOCALBASE}/bin/pads:${PORTSDIR}/net-mgmt/pads
.endif
.if defined(WITH_FL0P)
RUN_DEPENDS+=	${LOCALBASE}/bin/fl0p:${PORTSDIR}/security/fl0p
.endif
.if defined(WITH_CHAOSREADER)
RUN_DEPENDS+=	${LOCALBASE}/bin/chaosreader:${PORTSDIR}/security/chaosreader
.endif
.if defined(WITH_ARGUS)
RUN_DEPENDS+=	${LOCALBASE}/bin/ra:${PORTSDIR}/net-mgmt/argus3-clients \
	${LOCALBASE}/sbin/argus:${PORTSDIR}/net-mgmt/argus3
.endif
.if defined(WITH_TCPICK)
RUN_DEPENDS+=	${LOCALBASE}/bin/tcpick:${PORTSDIR}/net/tcpick
.endif
.if defined(WITH_TCPTRACE)
RUN_DEPENDS+=	${LOCALBASE}/bin/tcptrace:${PORTSDIR}/net/tcptrace
.endif
.if defined(WITH_FOREMOST)
RUN_DEPENDS+=	${LOCALBASE}/bin/foremost:${PORTSDIR}/sysutils/foremost
.endif
.if defined(WITH_CHAOSREADER)
RUN_DEPENDS+=	${LOCALBASE}/bin/chaosreader:${PORTSDIR}/security/chaosreader
.endif

post-patch:
	${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/nsm

do-install:
	@${MKDIR} ${RUBY_SITELIBDIR}/${PORTNAME}
	@( cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${RUBY_SITELIBDIR}/${PORTNAME} )
	@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
	@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
		${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
.for D in modules
	@${MKDIR} ${DATADIR}/${D}
	@( cd ${WRKSRC}/${D} && ${COPYTREE_SHARE} . ${DATADIR}/${D} )
	@${FIND} ${DATADIR} -type f | \
		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
	@${FIND} ${DATADIR} -type d | ${SORT} -r | \
		${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
.endfor
	${INSTALL_SCRIPT} ${WRKSRC}/nsm ${PREFIX}/bin
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for F in ${NSM_DOC}
	${INSTALL_DATA} ${WRKSRC}/${F} ${DOCSDIR}/
.endfor
.endif

.include <bsd.port.post.mk>