aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2013-09-28 16:54:24 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2013-09-28 16:54:24 +0000
commit3e5c2b2fefeef3ff413e0b3b598af2dc48be3adb (patch)
tree598d8d28cce5d4920da646ab0ed2e1f51bf1ebfe
parent03ad7ca7444943eae504fef8b3e074b8accfd38e (diff)
downloadports-3e5c2b2fefeef3ff413e0b3b598af2dc48be3adb.tar.gz
ports-3e5c2b2fefeef3ff413e0b3b598af2dc48be3adb.zip
Notes
-rw-r--r--security/snortreport/Makefile57
-rw-r--r--security/snortreport/distinfo4
-rw-r--r--security/snortreport/files/pkg-message.in (renamed from security/snortreport/pkg-message)2
-rw-r--r--security/snortreport/pkg-plist67
4 files changed, 66 insertions, 64 deletions
diff --git a/security/snortreport/Makefile b/security/snortreport/Makefile
index 7f6edde828ff..6fd396f93581 100644
--- a/security/snortreport/Makefile
+++ b/security/snortreport/Makefile
@@ -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>
diff --git a/security/snortreport/distinfo b/security/snortreport/distinfo
index 019ef091656b..ad41d4d58e77 100644
--- a/security/snortreport/distinfo
+++ b/security/snortreport/distinfo
@@ -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
diff --git a/security/snortreport/pkg-message b/security/snortreport/files/pkg-message.in
index 6fa9c651fc19..1f7c45df5fe4 100644
--- a/security/snortreport/pkg-message
+++ b/security/snortreport/files/pkg-message.in
@@ -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
diff --git a/security/snortreport/pkg-plist b/security/snortreport/pkg-plist
index ed6a0c3be74b..3831005c0184 100644
--- a/security/snortreport/pkg-plist
+++ b/security/snortreport/pkg-plist
@@ -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%%