aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-11-09 14:05:30 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2013-11-09 14:05:30 +0000
commit605d017706bd86a9080a5c955842d9cea23ef30b (patch)
treedeaa30394117386918efe6fb77b8f0ab5ed73d76 /net-mgmt
parent5aa35d51c9006e7745e2ddc0904db9f58993541c (diff)
downloadports-605d017706bd86a9080a5c955842d9cea23ef30b.tar.gz
ports-605d017706bd86a9080a5c955842d9cea23ef30b.zip
net-mgmt/netdisco: make web insterface optional
PR: ports/183716 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=333292
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/netdisco/Makefile39
1 files changed, 23 insertions, 16 deletions
diff --git a/net-mgmt/netdisco/Makefile b/net-mgmt/netdisco/Makefile
index b2922e17e96a..29f85787b225 100644
--- a/net-mgmt/netdisco/Makefile
+++ b/net-mgmt/netdisco/Makefile
@@ -10,15 +10,13 @@ MASTER_SITES= SF
MAINTAINER= dgeo@centrale-marseille.fr
COMMENT= Web-based network management tool for moderate to large networks
-OPTIONS_DEFINE= DOCS GRAPHVIZ MIBS
-OPTIONS_DEFAULT=DOCS GRAPHVIZ MIBS
+OPTIONS_DEFINE= DOCS GRAPHVIZ MIBS WEBUI
+OPTIONS_DEFAULT=DOCS GRAPHVIZ MIBS WEBUI
MIBS_DESC= Depend on net-mgmt/netdisco-mibs
GRAPHVIZ_DESC= Install GraphViz for network map support
+WEBUI_DESC= With web interface (mod_perl2+apache22)
-RUN_DEPENDS+= ${APACHE_PKGNAMEPREFIX}mod_perl2>=0:${PORTSDIR}/www/mod_perl2 \
- p5-Apache-DBI>=0:${PORTSDIR}/www/p5-Apache-DBI \
- p5-libapreq2>=0:${PORTSDIR}/www/p5-libapreq2 \
- p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
+RUN_DEPENDS+= p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
p5-SNMP-Info>=3.01:${PORTSDIR}/net-mgmt/p5-SNMP-Info \
p5-HTML-Mason>=0:${PORTSDIR}/www/p5-HTML-Mason \
p5-DB_File-Lock>=0:${PORTSDIR}/devel/p5-DB_File-Lock \
@@ -26,7 +24,6 @@ RUN_DEPENDS+= ${APACHE_PKGNAMEPREFIX}mod_perl2>=0:${PORTSDIR}/www/mod_perl2 \
p5-Net-NBName>=0:${PORTSDIR}/net/p5-Net-NBName \
p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg \
p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser \
- p5-MasonX-Request-WithApacheSession>=0:${PORTSDIR}/www/p5-MasonX-Request-WithApacheSession \
p5-Parallel-ForkManager>=0:${PORTSDIR}/devel/p5-Parallel-ForkManager
USERS= netdisco
@@ -34,7 +31,6 @@ GROUPS= netdisco
USES= perl5
USE_PGSQL= yes
-USE_APACHE_RUN= 22+
USE_RC_SUBR= netdisco
@@ -64,7 +60,7 @@ MIBSDIR= ${PREFIX}/share/netdisco-mibs
.if ${PORT_OPTIONS:MMIBS}
RUN_DEPENDS+= ${MIBSDIR}/mib_index.txt:${PORTSDIR}/net-mgmt/netdisco-mibs
BUILD_DEPENDS+= ${MIBSDIR}/mib_index.txt:${PORTSDIR}/net-mgmt/netdisco-mibs
-. include "${.CURDIR}/../netdisco-mibs/bsd.port.netdisco.mk"
+. include "${.CURDIR}/../netdisco-mibs/bsd.port.netdisco.mk"
MIBINCLUDES!=${ECHO} \"${MIBDIRS:S/^/${MIBSDIR}\//}\"
MIBINCLUDES:=${MIBINCLUDES:S/ /:/g:S/"//g}
.else
@@ -76,6 +72,16 @@ RUN_DEPENDS+= p5-Graph>=0:${PORTSDIR}/math/p5-Graph \
p5-GraphViz>=0:${PORTSDIR}/graphics/p5-GraphViz
.endif
+.if ${PORT_OPTIONS:MWEBUI}
+RUN_DEPENDS+= ${APACHE_PKGNAMEPREFIX}mod_perl2>=0:${PORTSDIR}/www/mod_perl2 \
+ p5-Apache-DBI>=0:${PORTSDIR}/www/p5-Apache-DBI \
+ p5-libapreq2>=0:${PORTSDIR}/www/p5-libapreq2 \
+ p5-MasonX-Request-WithApacheSession>=0:${PORTSDIR}/www/p5-MasonX-Request-WithApacheSession
+USE_APACHE_RUN= 22
+.else
+WWWDIR= "@comment "
+.endif
+
pre-install:
. for i in ${ALTER_FILES}
@(${MV} ${WRKSRC}/${i}.bak ${WRKSRC}/${i} 2>/dev/null || ${TRUE})
@@ -103,18 +109,19 @@ do-install:
cd ${WRKSRC} && ${INSTALL_SCRIPT} ${i} ${PREFIX}/bin
. endfor
- ${MKDIR} ${WWWDIR}
- cd ${WRKSRC}/html && ${INSTALL_DATA} autohandler *.* ${WWWDIR}
+. if ${PORT_OPTIONS:MWEBUI}
+ ${MKDIR} ${WWWDIR}
+ cd ${WRKSRC}/html && ${INSTALL_DATA} autohandler *.* ${WWWDIR}
- ${MKDIR} ${WWWDIR}/doc
- cd ${WRKSRC}/html/doc && ${INSTALL_DATA} *.* ${WWWDIR}/doc
+ ${MKDIR} ${WWWDIR}/doc
+ cd ${WRKSRC}/html/doc && ${INSTALL_DATA} *.* ${WWWDIR}/doc
- ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+ ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
- ${MKDIR} ${WWWDIR}/mason
+ ${MKDIR} ${WWWDIR}/mason
+. endif
${INSTALL_DATA} ${WRKSRC}/netdisco.pm ${SITE_PERL}
-
${INSTALL} -d -m 750 -o ${USERS} -g ${GROUPS} ${ETCDIR}
. for i in ${CONFIG_FILES}