- update to version 1.3.4

- add OPTIONS support
- add stage support

Changes:
 - support snort 2.9.5
 - Removed the need for jpgraph to display the pie chart
 - Other code improvements
This commit is contained in:
Olli Hauer 2013-09-28 16:54:24 +00:00
parent 03ad7ca744
commit 3e5c2b2fef
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328595
4 changed files with 66 additions and 64 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= snortreport
PORTVERSION= 1.3.3
PORTREVISION= 1
PORTVERSION= 1.3.4
CATEGORIES= security www
MASTER_SITES= http://www.symmetrixtech.com/ids/
@ -12,47 +11,49 @@ COMMENT= Add-on module for snort to generate real-time web reports
LICENSE= GPLv2
.if !defined(WITHOUT_JPGRAPH)
RUN_DEPENDS= ${LOCALBASE}/share/jpgraph/jpgraph.php:${PORTSDIR}/graphics/jpgraph2
.endif
OPTIONS_DEFINE= BARNYARD JPGRAPH MYSQL PGSQL
BARNYARD_DESC= Depend on Barnyard2
JPGRAPH_DESC= Graphical charting
BARNYARD_RUN_DEPENDS= barnyard2:${PORTSDIR}/security/barnyard2
JPGRAPH_RUN_DEPENDS= ${LOCALBASE}/share/jpgraph/jpgraph.php:${PORTSDIR}/graphics/jpgraph2
.include <bsd.port.options.mk>
NO_BUILD= yes
SUB_FILES= pkg-message
PORTDOCS= INSTALL Performance.txt create_indexes.sql
FTYPES= css html js php phps png sample
USE_PHP= yes
WANT_PHP_WEB= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
NO_BUILD= yes
.if ${PORT_OPTIONS:MMYSQL}
USE_PHP+= mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PHP+= pgsql
.endif
NO_STAGE= yes
pre-everything::
@${ECHO} ""
@${ECHO} "You have to configure PHP either with MySQL or PostgreSQL"
@${ECHO} "support in order to let snortreport collect its data."
@${ECHO} "Is is also suggested to compile support for GD in"
@${ECHO} "and have Jpgraph installed in order to view the charts."
@${ECHO} ""
pre-patch:
@${SED} 's|%%PREFIX%%|${PREFIX}|g' \
${PKGDIR}/pkg-message > ${PKGMESSAGE}
post-patch:
${MV} ${WRKSRC}/srconf.php ${WRKSRC}/srconf.php.sample
do-install:
${MKDIR} ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.php ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.css ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.png ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.html ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.phps ${PREFIX}/www/snortreport
${CP} -p ${WRKSRC}/*.js ${PREFIX}/www/snortreport
${CHOWN} -R www:www ${PREFIX}/www/snortreport
# srconf.conf contains snort database login credentials
${INSTALL} -o ${WWWOWN} -g ${WWWGRP} -m 750 -d ${STAGEDIR}${WWWDIR}
${INSTALL_DATA} ${FTYPES:S|^|${WRKSRC}/*|} ${STAGEDIR}${WWWDIR}
post-install:
.if !defined(NOPORTDOCS)
${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/Performance.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/create_indexes.sql ${DOCSDIR}
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (snortreport-1.3.3.tar.gz) = 9303e96eed0c3e92a238ab6652afa4920596fb56ffa4e344c5f1791bdc943acf
SIZE (snortreport-1.3.3.tar.gz) = 44589
SHA256 (snortreport-1.3.4.tar.gz) = b57cc8e6cab84a91af7d5edd74950995d08bfad3a6fd9fa7069516d1caa096a9
SIZE (snortreport-1.3.4.tar.gz) = 50861

View File

@ -1,5 +1,5 @@
***************************************************************
Snortreport has been installed in %%PREFIX%%/www/snortreport.
Snortreport has been installed in %%WWWDIR%%.
Change into this directory and make any necessary change to
the config file (srconf.php).
Also modify your web server configuration to let access to this

View File

@ -1,33 +1,34 @@
www/snortreport/DB.php
www/snortreport/DB_mysql.php
www/snortreport/DB_pgsql.php
www/snortreport/alertchart.php
www/snortreport/alerts.php
www/snortreport/default.css
www/snortreport/functions.php
www/snortreport/go.png
www/snortreport/index.php
www/snortreport/info-retrieval.php
www/snortreport/ipdetail.php
www/snortreport/menu.html
www/snortreport/nbtscan.php
www/snortreport/nmap.php
www/snortreport/nodata.png
www/snortreport/page_bottom.php
www/snortreport/page_top.php
www/snortreport/portscan.php
www/snortreport/profiling.phps
www/snortreport/psdetail.php
www/snortreport/sig-by-time-chart.php
www/snortreport/sigdetail.php
www/snortreport/srconf.php
www/snortreport/srlogo.png
www/snortreport/ssm.js
www/snortreport/ssmItems.js
www/snortreport/timespan.php
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/Performance.txt
%%PORTDOCS%%%%DOCSDIR%%/create_indexes.sql
@dirrm www/snortreport
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%WWWDIR%%/DB.php
%%WWWDIR%%/DB_mysql.php
%%WWWDIR%%/DB_pgsql.php
%%WWWDIR%%/GlowStick_Histogram.php
%%WWWDIR%%/GlowStick_Piechart.php
%%WWWDIR%%/alertchart.php
%%WWWDIR%%/alerts.php
%%WWWDIR%%/default.css
%%WWWDIR%%/functions.php
%%WWWDIR%%/go.png
%%WWWDIR%%/histogram.php
%%WWWDIR%%/index.php
%%WWWDIR%%/info-retrieval.php
%%WWWDIR%%/ipdetail.php
%%WWWDIR%%/menu.html
%%WWWDIR%%/nbtscan.php
%%WWWDIR%%/nmap.php
%%WWWDIR%%/nodata.png
%%WWWDIR%%/page_bottom.php
%%WWWDIR%%/page_top.php
%%WWWDIR%%/png.php
%%WWWDIR%%/portscan.php
%%WWWDIR%%/profiling.phps
%%WWWDIR%%/psdetail.php
%%WWWDIR%%/sig-by-time-chart.php
%%WWWDIR%%/sigdetail.php
@unexec if cmp -s %D/%%WWWDIR%/srconf.php.sample %D/%%WWWDIR%%/srconf.php; then rm -f %D/%%WWWDIR%%/srconf.php; fi
%%WWWDIR%%/srconf.php.sample
@exec [ -f %D/%%WWWDIR%%/srconf.php ] || cp %D/%%WWWDIR%%/srconf.php.sample %D/%%WWWDIR%%/srconf.php
%%WWWDIR%%/srlogo.png
%%WWWDIR%%/ssm.js
%%WWWDIR%%/ssmItems.js
%%WWWDIR%%/timespan.php
@dirrmtry %%WWWDIR%%