diff options
author | scheidell <scheidell@FreeBSD.org> | 2012-02-18 01:22:21 +0800 |
---|---|---|
committer | scheidell <scheidell@FreeBSD.org> | 2012-02-18 01:22:21 +0800 |
commit | 2050c37a5b2c3a71224f03fc5afdab4856a917f5 (patch) | |
tree | 6c127e777ebd6f48fff34d7255b9333b03623c81 /net-mgmt/netdisco/Makefile | |
parent | 20af662cdb4c58d9f805aa3489bca8ab97b1b972 (diff) | |
download | freebsd-ports-gnome-2050c37a5b2c3a71224f03fc5afdab4856a917f5.tar.gz freebsd-ports-gnome-2050c37a5b2c3a71224f03fc5afdab4856a917f5.tar.zst freebsd-ports-gnome-2050c37a5b2c3a71224f03fc5afdab4856a917f5.zip |
- Missed ../Makefile update for new port newdisc-mibs
- Updated netdisco to 1.1
- Updated netdisco to use netdisco-mibs instead of INDEX killer !=
- Pass maintainership to submitter (via private email)
- Update to use Apache 20+ instead of 13+
PR: ports/164955
Submitted by: Geoffroy Desvernay <dgeo@centrale-marseille.fr> (maintainer)
Approved by: gabor (mentor, implicit)
Feature safe: yes
Diffstat (limited to 'net-mgmt/netdisco/Makefile')
-rw-r--r-- | net-mgmt/netdisco/Makefile | 91 |
1 files changed, 58 insertions, 33 deletions
diff --git a/net-mgmt/netdisco/Makefile b/net-mgmt/netdisco/Makefile index 646650135d59..e6c3bde6adae 100644 --- a/net-mgmt/netdisco/Makefile +++ b/net-mgmt/netdisco/Makefile @@ -6,15 +6,17 @@ # PORTNAME= netdisco -PORTVERSION= 1.0 -PORTREVISION= 3 +PORTVERSION= 1.1 CATEGORIES= net-mgmt www MASTER_SITES= SF -DISTNAME= ${PORTNAME}-${PORTVERSION}_with_mibs -MAINTAINER= venture37@geeklan.co.uk +MAINTAINER= dgeo@centrale-marseille.fr COMMENT= Web-based network management tool for moderate to large networks +OPTIONS= GRAPHVIZ "Install GraphViz for network map support" on \ + OUIDL "Download oui.txt file" off \ + MIBS "depend on net-mgmt/netdisco-mibs" on + RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl2.pm:${PORTSDIR}/www/mod_perl2 \ ${SITE_PERL}/Apache/DBI.pm:${PORTSDIR}/www/p5-Apache-DBI \ ${SITE_PERL}/${PERL_ARCH}/APR/Request/Apache2.pm:${PORTSDIR}/www/p5-libapreq2 \ @@ -26,9 +28,8 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl2.pm:${PORTSDIR}/www/mod_perl2 ${SITE_PERL}/Net/NBName.pm:${PORTSDIR}/net/p5-Net-NBName \ ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg \ ${SITE_PERL}/${PERL_ARCH}/HTML/Entities.pm:${PORTSDIR}/www/p5-HTML-Parser \ - ${SITE_PERL}/MasonX/Request/WithApacheSession.pm:${PORTSDIR}/www/p5-MasonX-Request-WithApacheSession - -OPTIONS= GRAPHVIZ "Install GraphViz for network map support" on + ${SITE_PERL}/MasonX/Request/WithApacheSession.pm:${PORTSDIR}/www/p5-MasonX-Request-WithApacheSession \ + ${SITE_PERL}/Parallel/ForkManager.pm:${PORTSDIR}/devel/p5-Parallel-ForkManager \ USERS= netdisco GROUPS= netdisco @@ -41,12 +42,12 @@ USE_RC_SUBR= netdisco NO_BUILD= yes -RUNDIR?= /var/run -DBDIR?= /var/db +NETDISCO_RUNDIR=/var/run +NETDISCO_DBDIR= /var/db/netdisco SUB_FILES= pkg-message -SUB_LIST= DBDIR=${DBDIR} -PLIST_SUB= DBDIR=${DBDIR} +SUB_LIST= NETDISCO_DBDIR=${NETDISCO_DBDIR} NETDISCO_RUNDIR=${NETDISCO_RUNDIR} NETDISCO_USER=${USERS} +PLIST_SUB= NETDISCO_DBDIR=${NETDISCO_DBDIR} NETDISCO_RUNDIR=${NETDISCO_RUNDIR} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} @@ -56,8 +57,24 @@ ALTER_FILES= netdisco netdisco.conf netdisco_apache.conf \ CONFIG_FILES= netdisco.conf netdisco.crontab netdisco-topology.txt \ netdisco_apache.conf netdisco_apache_dir.conf +DOCS= doc/*.pod doc/*.html INSTALL README* UPGRADE + .include <bsd.port.pre.mk> +MIBSDIR= ${PREFIX}/share/netdisco-mibs +.if defined(WITH_MIBS) +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" +MIBINCLUDES= +. for mib in ${MIBDIRS} +MIBINCLUDES+= ${MIBSDIR}/${mib}, +. endfor +MIBINCLUDES:=${MIBINCLUDES:S/,$//} +.else +MIBINCLUDES="#please add here mibs dirs list (at least snmp and rfc ones)" +.endif + .if ${PERL_LEVEL} < 500703 RUN_DEPENDS+= p5-Digest-MD5>=2.16:${PORTSDIR}/security/p5-Digest-MD5 .endif @@ -71,6 +88,12 @@ RUN_DEPENDS+= ${SITE_PERL}/Graph.pm:${PORTSDIR}/math/p5-Graph \ ${SITE_PERL}/GraphViz.pm:${PORTSDIR}/graphics/p5-GraphViz .endif +.if defined(WITH_OUIDL) +PLIST_SUB+= OUIDL="" +.else +PLIST_SUB+= OUIDL="@comment " +.endif + pre-install: . for i in ${ALTER_FILES} @(${MV} ${WRKSRC}/${i}.bak ${WRKSRC}/${i} 2>/dev/null || ${TRUE}) @@ -80,12 +103,16 @@ pre-install: ${REINPLACE_CMD} -e 's#%%WWWDIR%%#${WWWDIR}#g' \ -e 's#%%PREFIX%%#${PREFIX}#g' \ -e 's#%%DATADIR%%#${DATADIR}#g' \ - -e 's#%%RUNDIR%%#${RUNDIR}#g' \ - -e 's#%%DBDIR%%#${DBDIR}#g' \ + -e 's#%%NETDISCO_RUNDIR%%#${NETDISCO_RUNDIR}#g' \ + -e 's#%%NETDISCO_USER%%#${USERS}#g' \ + -e 's#%%NETDISCO_GROUP%%#${GROUPS}#g' \ + -e 's#%%NETDISCO_DBDIR%%#${NETDISCO_DBDIR}#g' \ -e 's#%%ETCDIR%%#${ETCDIR}#g' \ -e 's#%%SITE_PERL%%#${SITE_PERL}#g' \ -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \ - -e 's#%%APACHEMODDIR%%#${APACHEMODDIR}#g'\ + -e 's#%%APACHEMODDIR%%#${APACHEMODDIR}#g' \ + -e 's#%%APACHEETCDIR%%#${APACHEETCDIR}#g' \ + -e 's#%%MIBINCLUDES%%#${MIBINCLUDES}#g' \ ${ALTER_FILES} do-install: @@ -105,41 +132,39 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/netdisco.pm ${SITE_PERL} - ${MKDIR} ${ETCDIR} + ${INSTALL} -d -m 750 -o ${USERS} -g ${GROUPS} ${ETCDIR} . for i in ${CONFIG_FILES} cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${ETCDIR}/${i}.sample @(if [ ! -f ${ETCDIR}/${i} ]; then \ - ${CP} ${ETCDIR}/${i}.sample \ - ${ETCDIR}/${i}; \ + ${INSTALL} -m 640 -o ${USERS} -g ${GROUPS} ${ETCDIR}/${i}.sample ${ETCDIR}/${i}; \ fi) . endfor - ${MKDIR} ${DATADIR}/sql + ${CHOWN} -R ${USERS}:${GROUPS} ${ETCDIR} + ${CHMOD} -R 660 ${ETCDIR}/* + + ${INSTALL} -d ${DATADIR}/sql cd ${WRKSRC}/sql && \ ${INSTALL_DATA} *.sql pg ${DATADIR}/sql - ${MKDIR} ${DATADIR}/mibs - - cd ${WRKSRC} && ${FIND} mibs \ - | ${CPIO} -pu -R ${SHAREOWN}:${SHAREGRP} ${DATADIR} - - ${MKDIR} ${DBDIR}/${PORTNAME} - - ${CHOWN} -R ${USERS}:${GROUPS} ${ETCDIR} - ${CHMOD} -R 660 ${ETCDIR}/* - ${CHOWN} -R ${USERS}:${GROUPS} ${DBDIR}/netdisco + ${INSTALL_DATA} ${WRKSRC}/Makefile ${DATADIR} . if !defined(PACKAGE_BUILDING) - @(if [ -f ${LOCALBASE}/${APACHEETCDIR}/httpd.conf ] ; then \ - ${ECHO_MSG} "===> Updating ${LOCALBASE}/${APACHEETCDIR}/httpd.conf..."; \ - ${ECHO_CMD} "# Netdisco include files" >> ${LOCALBASE}/${APACHEETCDIR}/httpd.conf; \ - ${ECHO_CMD} "Include ${ETCDIR}/netdisco_apache.conf" >> ${LOCALBASE}/${APACHEETCDIR}/httpd.conf; \ - ${ECHO_CMD} "Include ${ETCDIR}/netdisco_apache_dir.conf" >> ${LOCALBASE}/${APACHEETCDIR}/httpd.conf; \ + @(if [ -d ${LOCALBASE}/${APACHEETCDIR}/Includes ] ; then \ + ${ECHO_MSG} "===> Adding config in ${LOCALBASE}/${APACHEETCDIR}/Includes..."; \ + test -L ${LOCALBASE}/${APACHEETCDIR}/Includes/netdisco_apache.conf || \ + ${LN} -s ${ETCDIR}/netdisco_apache.conf ${LOCALBASE}/${APACHEETCDIR}/Includes/netdisco_apache.conf; \ + test -L ${LOCALBASE}/${APACHEETCDIR}/Includes/netdisco_apache_dir.conf || \ + ${LN} -s ${ETCDIR}/netdisco_apache_dir.conf ${LOCALBASE}/${APACHEETCDIR}/Includes/netdisco_apache_dir.conf;\ fi) . endif +. if defined(WITH_OUIDL) + ${FETCH_CMD} -q -o ${DATADIR}/oui.txt http://standards.ieee.org/develop/regauth/oui/oui.txt +. endif + post-install: @${CAT} ${PKGMESSAGE} |