2009-09-09 03:42:44 +02:00
|
|
|
# New ports collection makefile for: barnyard2
|
|
|
|
# Date created: 28 Aug 2009
|
|
|
|
# Whom: pauls
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= barnyard2
|
2011-01-31 02:17:36 +01:00
|
|
|
PORTVERSION= 1.9
|
2011-04-04 23:28:15 +02:00
|
|
|
PORTREVISION= 2
|
2009-09-09 03:42:44 +02:00
|
|
|
CATEGORIES= security
|
|
|
|
MASTER_SITES= http://www.securixlive.com/download/barnyard2/
|
|
|
|
|
|
|
|
MAINTAINER= pauls@utdallas.edu
|
2011-04-04 23:28:15 +02:00
|
|
|
COMMENT= An output system for Snort or Suricata that parses unified2 files
|
2009-09-09 03:42:44 +02:00
|
|
|
|
|
|
|
OPTIONS= MYSQL "Enable MySQL support" on \
|
2011-04-04 23:28:15 +02:00
|
|
|
POSTGRESQL "Enable PostgreSQL support" off \
|
|
|
|
SNORT "Depend on security/snort" off \
|
2011-05-15 19:09:38 +02:00
|
|
|
SURICATA "Depend on security/suricata" off
|
|
|
|
.if !defined(SLAVE)
|
|
|
|
OPTIONS+= TCL "Enable TCL support" off
|
|
|
|
.endif
|
2009-09-09 03:42:44 +02:00
|
|
|
|
|
|
|
USE_RC_SUBR= barnyard2.sh
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2011-01-31 02:17:36 +01:00
|
|
|
PORTDOCS1= README
|
|
|
|
PORTDOCS2= INSTALL README.aruba README.database README.sguil
|
|
|
|
PORTDOCS= ${PORTDOCS1} ${PORTDOCS2}
|
2009-09-09 03:42:44 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
USE_MYSQL= yes
|
|
|
|
CONFIGURE_ARGS+= --with-mysql \
|
|
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql \
|
|
|
|
--with-mysql-libraries=${LOCALBASE}/lib/mysql
|
2012-01-06 22:53:32 +01:00
|
|
|
SUB_LIST+= MYSQL=" mysql"
|
|
|
|
.else
|
|
|
|
SUB_LIST+= MYSQL=""
|
2009-09-09 03:42:44 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_POSTGRESQL)
|
|
|
|
USE_PGSQL= yes
|
|
|
|
CONFIGURE_ARGS+= --with-postgresql
|
2012-01-06 22:53:32 +01:00
|
|
|
SUB_LIST+= PGSQL=" postgresql"
|
|
|
|
.else
|
|
|
|
SUB_LIST+= PGSQL=""
|
2009-09-09 03:42:44 +02:00
|
|
|
.endif
|
|
|
|
|
2011-04-04 23:28:15 +02:00
|
|
|
.if defined(WITH_SNORT)
|
2011-08-19 15:02:39 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/snort:${PORTSDIR}/security/snort
|
2011-04-04 23:28:15 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_SURICATA)
|
2011-08-19 15:02:39 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/suricata:${PORTSDIR}/security/suricata
|
2011-04-04 23:28:15 +02:00
|
|
|
.endif
|
|
|
|
|
2011-05-15 19:09:38 +02:00
|
|
|
.if defined(WITH_TCL)
|
|
|
|
USE_TCL= yes
|
|
|
|
CONFIGURE_ARGS+= --with-tcl=${PREFIX}/lib/tcl8.4
|
2011-08-19 15:02:39 +02:00
|
|
|
LIB_DEPENDS+= tcl84.1:${PORTSDIR}/lang/tcl84
|
2011-05-15 19:09:38 +02:00
|
|
|
.endif
|
|
|
|
|
2010-01-17 20:55:01 +01:00
|
|
|
pre-install:
|
|
|
|
${CHMOD} 744 ${WRKSRC}/install-sh
|
2010-01-17 14:55:14 +01:00
|
|
|
|
2010-07-05 22:20:35 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} 's|/etc|${LOCALBASE}/etc|' \
|
|
|
|
${WRKSRC}/etc/barnyard2.conf
|
|
|
|
|
2009-09-09 03:42:44 +02:00
|
|
|
post-install:
|
|
|
|
|
|
|
|
.for f in barnyard2.conf
|
|
|
|
[ -f ${PREFIX}/etc/${f} ] || \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}
|
|
|
|
.endfor
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
2011-01-31 02:17:36 +01:00
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS1} ${DOCSDIR}
|
|
|
|
cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS2} ${DOCSDIR}
|
2009-09-09 03:42:44 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|