openbsd-ports/net/snort/Makefile

88 lines
2.0 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.51 2007/09/15 22:36:59 merdely Exp $
COMMENT= highly flexible sniffer/NIDS
DISTNAME= snort-2.6.0.2
PKGNAME= ${DISTNAME}p1
CATEGORIES= net security
MASTER_SITES= ${HOMEPAGE}/dl/current/
HOMEPAGE= http://www.snort.org/
# GPL
2000-04-22 23:34:40 -04:00
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
2004-12-15 19:31:20 -05:00
WANTLIB= c m pcap
SHARED_LIBS= sf_engine 0.0 \
sf_dns_preproc 0.0 \
sf_ftptelnet_preproc 0.0 \
sf_smtp_preproc 0.0
USE_LIBTOOL= Yes
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
--enable-dynamicplugin
LIB_DEPENDS= pcre::devel/pcre
2006-01-05 23:22:06 -05:00
# gcc 3.3.5, Bus errors
.if ${MACHINE_ARCH} == "sparc64"
CFLAGS+= -O0
.endif
FLAVORS= postgresql mysql flexresp prelude
2001-02-11 18:51:12 -05:00
FLAVOR?=
.if ${FLAVOR:L:Mflexresp}
LIB_DEPENDS+= dnet.=1::net/libdnet
CONFIGURE_ARGS+=--enable-flexresp2
2001-02-11 18:51:12 -05:00
.endif
.if ${FLAVOR:L:Mpostgresql}
2006-08-03 19:15:57 -04:00
LIB_DEPENDS+= pq.>=2::databases/postgresql
CONFIGURE_ARGS+=--with-postgresql="${LOCALBASE}"
2001-02-11 18:51:12 -05:00
.endif
.if ${FLAVOR:L:Mmysql}
2006-08-03 19:15:57 -04:00
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
CONFIGURE_ARGS+=--with-mysql="${LOCALBASE}"
2004-12-15 19:31:20 -05:00
WANTLIB+= z
2001-02-11 18:51:12 -05:00
.endif
.if ${FLAVOR:L:Mprelude}
MODULES= devel/gettext
WANTLIB+= gcrypt gpg-error pthread z
2006-08-03 19:15:57 -04:00
LIB_DEPENDS+= prelude.>=8::security/prelude/libprelude
CONFIGURE_ARGS+=--enable-prelude
MESSAGE= ${PKGDIR}/MESSAGE-prelude
.endif
2006-02-04 08:15:42 -05:00
CONFIGS= classification.config gen-msg.map generators reference.config \
sid sid-msg.map snort.conf threshold.conf unicode.map
DOCS= AUTHORS CREDITS README.* *.pdf
post-build:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," \
${WRKSRC}/etc/snort.conf
@perl -pi -e "s,/usr/local/,${LOCALBASE}/," \
${WRKSRC}/etc/snort.conf
post-install:
2001-02-11 18:51:12 -05:00
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/snort
2006-02-04 08:15:42 -05:00
.for i in ${CONFIGS}
${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/share/examples/snort
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snort
.for j in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/doc/${j} ${PREFIX}/share/doc/snort
.endfor
.include <bsd.port.mk>