summaryrefslogtreecommitdiff
path: root/net/snort/options.mk
blob: b6fba09d44f36e1b29a0a6f197deb671e0dd03af (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# $NetBSD: options.mk,v 1.7 2012/09/12 13:16:38 obache Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.snort

PKG_SUPPORTED_OPTIONS=	debug snort-prelude ssl snmp snort-gre
PKG_SUPPORTED_OPTIONS+=	snort-dynamicplugin snort-timestats
PKG_SUPPORTED_OPTIONS+=	snort-rulestate inet6
# does not work on SunOS
.if ${OPSYS} != "SunOS"
PKG_SUGGESTED_OPTIONS=	inet6
.endif


PKG_OPTIONS_OPTIONAL_GROUPS=	flex
PKG_OPTIONS_GROUP.flex=		snort-flexresp snort-flexresp2

PKG_OPTIONS_OPTIONAL_GROUPS+=	database
PKG_OPTIONS_GROUP.database=	mysql pgsql

.include "../../mk/bsd.options.mk"

###
### Please note that a large number of these options remain un-tested
### for this package.
###

###
### Enable dynamically loadable preprocessors, detection engine
### and rules libraries.
###
.if !empty(PKG_OPTIONS:Msnort-dynamicplugin)
CONFIGURE_ARGS+=	--enable-dynamicplugin
.endif

###
### Enable rule state configuration feature
###
.if !empty(PKG_OPTIONS:Msnort-rulestate)
CONFIGURE_ARGS+=	--enable-rulestate
.endif

###
### Enable ipv6 support
###
.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+=	--enable-ipv6
.endif

###
### Enable real-time performance statistics
###
.if !empty(PKG_OPTIONS:Msnort-timestats)
CONFIGURE_ARGS+=	--enable-timestats
.endif

###
### Enable debug support
###
.if !empty(PKG_OPTIONS:Mdebug)
CONFIGURE_ARGS+=	--enable-debug
.endif

###
### Support for openssl (used by the XML output plugin)
###
.if !empty(PKG_OPTIONS:Mssl)
CONFIGURE_ARGS+=	--with-openssl
.endif

###
### Enable GRE decoder
###
.if !empty(PKG_OPTIONS:Msnort-gre)
CONFIGURE_ARGS+=	--enable-gre
.endif

###
### Enable SNMP alerting code
###
.if !empty(PKG_OPTIONS:Msnmp)
CONFIGURE_ARGS+=	--with-snmp
.endif

###
### Support MySQL for snort logging
###
.if !empty(PKG_OPTIONS:Mmysql)
.include "../../mk/mysql.buildlink3.mk"
CONFIGURE_ARGS+=	--with-mysql=${BUILDLINK_PREFIX.mysql-client}
LDFLAGS+=		${BUILDLINK_LDFLAGS.mysql-client}
.endif

###
### Support PostgreSQL for snort logging
###
.if !empty(PKG_OPTIONS:Mpgsql)
.include "../../mk/pgsql.buildlink3.mk"
CONFIGURE_ARGS+=	--with-postgresql=${PGSQL_PREFIX:Q}
.endif

###
### Enable Prelude support (untested)
###
.if !empty(PKG_OPTIONS:Msnort-prelude)
.include "../../security/libprelude/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-prelude
.endif

###
### Flexible Responses on hostile connection attempts (untested)
###
.if !empty(PKG_OPTIONS:Msnort-flexresp)
.include "../../devel/libnet10/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-flexresp
CONFIGURE_ARGS+=	--with-libnet-includes=${BUILDLINK_PREFIX.libnet10}/include/libnet10
CONFIGURE_ARGS+=	--with-libnet-libraries=${BUILDLINK_PREFIX.libnet10}/lib/libnet10
SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	pre-configure
SUBST_FILES.conf=	configure
SUBST_SED.conf=		-e "s|libnet-config|libnet10-config|g"
SUBST_MESSAGE.conf=	Fixing configuration script.
.endif

###
### NEW Flexible Responses on hostile connection attempts (untested)
###
.if !empty(PKG_OPTIONS:Msnort-flexresp2)
.include "../../devel/libnet11/buildlink3.mk"
.include "../../net/libdnet/buildlink3.mk"
CONFIGURE_ARGS+=	--with-libnet-includes=${BUILDLINK_PREFIX.libnet11}/include/libnet11
CONFIGURE_ARGS+=	--with-libnet-libraries=${BUILDLINK_PREFIX.libnet11}/lib/libnet11
CONFIGURE_ARGS+=	--enable-flexresp2
SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	pre-configure
SUBST_FILES.conf=	configure
SUBST_SED.conf=		-e "s|libnet-config|libnet11-config|g"
SUBST_MESSAGE.conf=	Fixing configuration script.
.endif