Lines 6-13
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= sguil-sensor |
8 |
PORTNAME= sguil-sensor |
9 |
PORTVERSION= 0.7.0 |
9 |
PORTVERSION= 0.8.0 |
10 |
PORTREVISION= 3 |
|
|
11 |
CATEGORIES= security |
10 |
CATEGORIES= security |
12 |
MASTER_SITES= SF/sguil/sguil/sguil-${PORTVERSION} |
11 |
MASTER_SITES= SF/sguil/sguil/sguil-${PORTVERSION} |
13 |
|
12 |
|
Lines 15-118
Link Here
|
15 |
COMMENT= Sguil is a network security monitoring program |
14 |
COMMENT= Sguil is a network security monitoring program |
16 |
|
15 |
|
17 |
LIB_DEPENDS= tls:${PORTSDIR}/devel/tcltls |
16 |
LIB_DEPENDS= tls:${PORTSDIR}/devel/tcltls |
18 |
RUN_DEPENDS= snort:${PORTSDIR}/security/snort \ |
17 |
RUN_DEPENDS= barnyard2:${PORTSDIR}/security/barnyard2-sguil \ |
19 |
barnyard2:${PORTSDIR}/security/barnyard2 \ |
|
|
20 |
${LOCALBASE}/lib/tclx8.4/tclx.tcl:${PORTSDIR}/lang/tclX |
18 |
${LOCALBASE}/lib/tclx8.4/tclx.tcl:${PORTSDIR}/lang/tclX |
21 |
|
19 |
|
22 |
OPTIONS= SANCP "Include sancp sensor" off \ |
20 |
OPTIONS_DEFINE= PADS SANCP |
23 |
PADS "Include pads sensor" off |
21 |
PADS_DESC= Include pads sensor |
|
|
22 |
SANCP_DESC= Include sancp sensor |
24 |
|
23 |
|
|
|
24 |
LICENSE_NAME= QPLv1.0 |
25 |
LICENSE_FILE= ${WRKSRC}/doc/LICENSE.QPL |
26 |
LICENSE_PERMS= auto-accept |
27 |
|
25 |
NO_BUILD= yes |
28 |
NO_BUILD= yes |
26 |
USE_RC_SUBR= example_agent pcap_agent snort_agent |
29 |
USE_RC_SUBR= pcap_agent snort_agent |
27 |
TCLSH_CMD?= tclsh8.4 |
30 |
TCL_VER= 8.5 |
|
|
31 |
TCLSH= tclsh${TCL_VER} |
28 |
WRKSRC= ${WRKDIR}/sguil-${PORTVERSION} |
32 |
WRKSRC= ${WRKDIR}/sguil-${PORTVERSION} |
29 |
SUB_LIST= SGUILDIR=${SGUILDIR} |
33 |
PATCH_WRKSRC= ${WRKSRC}/sensor |
|
|
34 |
SGUILDIR?= sguil-sensor |
35 |
SUB_LIST= SGUILDIR=${SGUILDIR} TCLSH=${TCLSH} |
30 |
SUB_FILES= pkg-message |
36 |
SUB_FILES= pkg-message |
31 |
PLIST_SUB= SGUILDIR=${SGUILDIR} |
37 |
PLIST_SUB= SGUILDIR=${SGUILDIR} |
32 |
SGUILDIR?= sguil-sensor |
38 |
AGENTS= pcap_agent.tcl snort_agent.tcl |
33 |
AGENTS= example_agent.tcl pads_agent.tcl pcap_agent.tcl sancp_agent.tcl snort_agent.tcl |
39 |
CONFS= pcap_agent.conf snort_agent.conf |
|
|
40 |
LOG_SCRIPTS= log_packets-daemonlogger.sh log_packets.sh |
41 |
WITH_PCRE= true |
34 |
|
42 |
|
35 |
PORTDOCS= CHANGES FAQ INSTALL INSTALL.openbsd LICENSE.QPL \ |
43 |
PORTDOCS1= README |
36 |
OPENSSL.README TODO UPGRADE USAGE sguildb.dia |
44 |
PORTDOCS2= README.daemonlogger |
|
|
45 |
PORTDOCS3= CHANGES FAQ INSTALL INSTALL.openbsd OPENSSL.README \ |
46 |
TODO UPGRADE USAGE sguildb.dia |
37 |
|
47 |
|
38 |
.include <bsd.port.pre.mk> |
48 |
.include <bsd.port.options.mk> |
39 |
|
49 |
|
40 |
WITH_PCRE= true |
50 |
.if ${PORT_OPTIONS:MSANCP} |
41 |
|
51 |
AGENTS+= sancp_agent.tcl pcap_agent-sancp.tcl |
42 |
.if defined(WITH_SANCP) |
52 |
CONFS+= sancp_agent.conf sancp-indexed.conf pcap_agent-sancp.conf |
43 |
RUN_DEPENDS+= sancp:${PORTSDIR}/security/sancp |
53 |
RUN_DEPENDS+= sancp:${PORTSDIR}/security/sancp |
44 |
USE_RC_SUBR+= sancp_agent |
54 |
USE_RC_SUBR+= sancp_agent pcap_agent-sancp |
45 |
PLIST_SUB+= USESANCP= |
55 |
PLIST_SUB+= USESANCP="" |
46 |
.else |
56 |
.else |
47 |
PLIST_SUB+= USESANCP="@comment " |
57 |
PLIST_SUB+= USESANCP="@comment " |
48 |
.endif |
58 |
.endif |
49 |
|
59 |
|
50 |
.if defined(WITH_PADS) |
60 |
.if ${PORT_OPTIONS:MPADS} |
|
|
61 |
AGENTS+= pads_agent.tcl |
62 |
CONFS+= pads_agent.conf |
51 |
RUN_DEPENDS+= pads:${PORTSDIR}/net-mgmt/pads |
63 |
RUN_DEPENDS+= pads:${PORTSDIR}/net-mgmt/pads |
52 |
USE_RC_SUBR+= pads_agent |
64 |
USE_RC_SUBR+= pads_agent |
53 |
PLIST_SUB+= USEPADS= |
65 |
PLIST_SUB+= USEPADS="" |
54 |
.else |
66 |
.else |
55 |
PLIST_SUB+= USEPADS="@comment " |
67 |
PLIST_SUB+= USEPADS="@comment " |
56 |
.endif |
68 |
.endif |
57 |
|
69 |
|
58 |
post-patch: |
70 |
post-patch: |
59 |
.for f in ${AGENTS} |
71 |
.for f in ${AGENTS} |
60 |
@${REINPLACE_CMD} -e 's:exec tclsh:exec ${PREFIX}/bin/${TCLSH_CMD}:g' \ |
72 |
@${REINPLACE_CMD} 's|/bin/sh|${PREFIX}/bin/${TCLSH}|' \ |
61 |
${WRKSRC}/sensor/${f} |
73 |
${WRKSRC}/sensor/${f} |
62 |
@${REINPLACE_CMD} -e 's:/etc/:${PREFIX}/etc/${SGUILDIR}/:g' \ |
|
|
63 |
${WRKSRC}/sensor/${f} |
64 |
.endfor |
74 |
.endfor |
65 |
|
75 |
|
66 |
do-install: |
76 |
do-install: |
67 |
@${MKDIR} ${PREFIX}/bin/${SGUILDIR} |
77 |
@${MKDIR} ${PREFIX}/bin/${SGUILDIR} |
68 |
@${MKDIR} ${PREFIX}/etc/${SGUILDIR} |
78 |
@${MKDIR} ${PREFIX}/etc/${SGUILDIR} |
69 |
.for f in example_agent.tcl pcap_agent.tcl snort_agent.tcl |
79 |
@${MKDIR} ${PREFIX}/share/${SGUILDIR} |
|
|
80 |
@${MKDIR} ${PREFIX}/share/${SGUILDIR}/contrib |
81 |
@${MKDIR} ${PREFIX}/share/${SGUILDIR}/init |
82 |
(cd ${WRKSRC}/sensor/contrib && ${COPYTREE_SHARE} \* ${PREFIX}/share/${SGUILDIR}/contrib "! -name ossec_agent.tcl.orig") |
83 |
(cd ${WRKSRC}/sensor/init && ${COPYTREE_SHARE} \* ${PREFIX}/share/${SGUILDIR}/init) |
84 |
.for f in ${AGENTS} |
70 |
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/sensor/${f} \ |
85 |
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/sensor/${f} \ |
71 |
${PREFIX}/bin/${SGUILDIR}/${f} |
86 |
${PREFIX}/bin/${SGUILDIR}/${f} |
72 |
.endfor |
87 |
.endfor |
73 |
.for f in log_packets.sh |
88 |
.for f in ${LOG_SCRIPTS} |
74 |
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/sensor/${f} \ |
89 |
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/sensor/${f} \ |
75 |
${PREFIX}/bin/${SGUILDIR}/${f} |
90 |
${PREFIX}/bin/${SGUILDIR}/${f} |
76 |
.endfor |
91 |
.endfor |
77 |
.for f in example_agent.conf pcap_agent.conf snort_agent.conf |
92 |
.for f in ${CONFS} |
78 |
${INSTALL_DATA} ${WRKSRC}/sensor/${f} \ |
93 |
${INSTALL_DATA} ${WRKSRC}/sensor/${f} \ |
79 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
94 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
80 |
.endfor |
95 |
.endfor |
81 |
.for f in log_packets.conf |
96 |
.if ${PORT_OPTIONS:MSANCP} |
82 |
${INSTALL_DATA} ${FILESDIR}/${f} \ |
97 |
.for f in log_packets-sancp.sh |
83 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
98 |
${INSTALL_SCRIPT} -m 751 ${WRKSRC}/sensor/${f} \ |
|
|
99 |
${PREFIX}/bin/${SGUILDIR}/${f} |
84 |
.endfor |
100 |
.endfor |
85 |
.if defined(WITH_SANCP) |
|
|
86 |
.for f in sancp_agent.conf |
87 |
${INSTALL_DATA} ${WRKSRC}/sensor/${f} \ |
88 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
89 |
.endfor |
90 |
.for f in sancp.conf |
101 |
.for f in sancp.conf |
91 |
${INSTALL_DATA} ${WRKSRC}/sensor/sancp/${f} \ |
102 |
${INSTALL_DATA} ${WRKSRC}/sensor/sancp/${f} \ |
92 |
${PREFIX}/etc/${f}-sample |
|
|
93 |
.endfor |
94 |
.for f in sancp_agent.tcl |
95 |
${INSTALL_SCRIPT} ${WRKSRC}/sensor/${f} \ |
96 |
${PREFIX}/bin/${SGUILDIR}/${f} |
97 |
.endfor |
98 |
.endif |
99 |
.if defined(WITH_PADS) |
100 |
.for f in pads_agent.conf |
101 |
${INSTALL_DATA} ${WRKSRC}/sensor/${f} \ |
102 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
103 |
${PREFIX}/etc/${SGUILDIR}/${f}-sample |
103 |
.endfor |
104 |
.endfor |
104 |
.for f in pads_agent.tcl |
|
|
105 |
${INSTALL_SCRIPT} ${WRKSRC}/sensor/${f} \ |
106 |
${PREFIX}/bin/${SGUILDIR}/${f} |
107 |
.endfor |
108 |
.endif |
105 |
.endif |
109 |
post-install: |
106 |
post-install: |
110 |
|
107 |
|
111 |
.if !defined(NOPORTDOCS) |
108 |
.if ${PORT_OPTIONS:MDOCS} |
112 |
@${MKDIR} ${DOCSDIR} |
109 |
@${MKDIR} ${DOCSDIR} |
113 |
cd ${WRKSRC}/doc && ${INSTALL_DATA} \ |
110 |
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS1} ${DOCSDIR} |
114 |
${PORTDOCS} ${DOCSDIR} |
111 |
cd ${WRKSRC}/sensor && ${INSTALL_DATA} ${PORTDOCS2} ${DOCSDIR} |
|
|
112 |
cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS3} ${DOCSDIR} |
113 |
.if ${PORT_OPTIONS:MSANCP} |
114 |
.for f in README.sancp_indexed_pcap |
115 |
cd ${WRKSRC}/sensor && ${INSTALL_DATA} ${f} ${DOCSDIR} |
116 |
.endfor |
115 |
.endif |
117 |
.endif |
|
|
118 |
.endif |
116 |
@${CAT} ${PKGMESSAGE} |
119 |
@${CAT} ${PKGMESSAGE} |
117 |
|
120 |
|
118 |
.include <bsd.port.post.mk> |
121 |
.include <bsd.port.mk> |