aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nedi
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-06-03 12:21:17 +0800
committerdanfe <danfe@FreeBSD.org>2014-06-03 12:21:17 +0800
commit6b24d47a0459c3fe81915ff8c1ea5cc3865d7b9d (patch)
tree508bd6495a673da14e7ebdb8ea6b6c5bbe6d62be /net-mgmt/nedi
parent47a8d9cc0ab7ddd9fa72b2395bba43dbf9ed0871 (diff)
downloadfreebsd-ports-gnome-6b24d47a0459c3fe81915ff8c1ea5cc3865d7b9d.tar.gz
freebsd-ports-gnome-6b24d47a0459c3fe81915ff8c1ea5cc3865d7b9d.tar.zst
freebsd-ports-gnome-6b24d47a0459c3fe81915ff8c1ea5cc3865d7b9d.zip
- Use OPTIONS helpers and remove .include <bsd.port.options.mk>
- Wrap overly long lines after stage conversion, sort USES and knobs - Try to improve port description text and COMMENT line - Trim bogus EOL whitespace, fix formatting in files/pkg-message.in - Utilize @sample keyword in pkg-plist, misc. Makefile cleanups NB: version 1.0.9 was released in January, 2014 (sf.net is no longer updated).
Diffstat (limited to 'net-mgmt/nedi')
-rw-r--r--net-mgmt/nedi/Makefile31
-rw-r--r--net-mgmt/nedi/files/pkg-message.in10
-rw-r--r--net-mgmt/nedi/pkg-descr5
-rw-r--r--net-mgmt/nedi/pkg-plist4
4 files changed, 24 insertions, 26 deletions
diff --git a/net-mgmt/nedi/Makefile b/net-mgmt/nedi/Makefile
index f9a4c689628f..306a9b5488cb 100644
--- a/net-mgmt/nedi/Makefile
+++ b/net-mgmt/nedi/Makefile
@@ -1,4 +1,4 @@
-# Created by: cristi <cristi@net.utcluj.ro>
+# Created by: Cristian KLEIN <cristi@net.utcluj.ro>
# $FreeBSD$
PORTNAME= nedi
@@ -8,42 +8,41 @@ CATEGORIES= net-mgmt
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/w
MAINTAINER= ports@FreeBSD.org
-COMMENT= Network Discovery and Monitoring tool
+COMMENT= Network discovery and monitoring tool
RUN_DEPENDS= p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
p5-Net-Telnet-Cisco>=0:${PORTSDIR}/net-mgmt/p5-Telnet-Cisco \
p5-Algorithm-Diff>=0:${PORTSDIR}/devel/p5-Algorithm-Diff \
p5-DBI>=0:${PORTSDIR}/databases/p5-DBI
+USES= perl5 shebangfix tar:tgz
+SHEBANG_FILES= *.pl
WRKSRC= ${WRKDIR}/${PORTNAME}
-USES= tar:tgz perl5 shebangfix
-SHEBANG_FILES= *.pl
NO_BUILD= yes
USE_PHP= session snmp mysql
WANT_PHP_WEB= yes
-OPTIONS_DEFINE= GD
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MGD}
-USE_PHP+= gd
-.endif
-
SUB_FILES= pkg-message
PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
+OPTIONS_DEFINE= GD
+GD_USE= PHP=gd
+
post-patch:
- @${REINPLACE_CMD} -e 's|/var/nedi|${WWWDIR}|' ${WRKSRC}/html/inc/libgraph.php
- @${REINPLACE_CMD} -e "s|'/etc|'${PREFIX}/etc|" ${WRKSRC}/html/inc/libmisc.php
+ @${REINPLACE_CMD} -e 's|/var/nedi|${WWWDIR}|' \
+ ${WRKSRC}/html/inc/libgraph.php
+ @${REINPLACE_CMD} -e "s|'/etc|'${PREFIX}/etc|" \
+ ${WRKSRC}/html/inc/libmisc.php
@${FIND} ${WRKSRC} \( -name *.bak -or -name *.orig \) -delete
do-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR})
${FIND} ${STAGEDIR}${WWWDIR} -name \*.pl | ${XARGS} ${CHMOD} 755
- ${MV} ${STAGEDIR}${WWWDIR}/seedlist ${STAGEDIR}${PREFIX}/etc/nedi.seedlist.sample
- ${MV} ${STAGEDIR}${WWWDIR}/nedi.conf ${STAGEDIR}${PREFIX}/etc/nedi.conf.sample
+ ${MV} ${STAGEDIR}${WWWDIR}/seedlist \
+ ${STAGEDIR}${PREFIX}/etc/nedi.seedlist.sample
+ ${MV} ${STAGEDIR}${WWWDIR}/nedi.conf \
+ ${STAGEDIR}${PREFIX}/etc/nedi.conf.sample
.include <bsd.port.mk>
diff --git a/net-mgmt/nedi/files/pkg-message.in b/net-mgmt/nedi/files/pkg-message.in
index 95170973e686..2fa9dc4d4ecd 100644
--- a/net-mgmt/nedi/files/pkg-message.in
+++ b/net-mgmt/nedi/files/pkg-message.in
@@ -1,16 +1,15 @@
-
To make NeDi work, do the following:
1. In %%PREFIX%%/etc, edit 'nedi.seedlist' and 'nedi.conf'.
Use the samples contained in that directory.
-
+
2. (Optional) Create a directory where you want NeDi to store its
RRD files and link it to %%WWWDIR%%/rrd:
rm -r %%WWWDIR%%/rrd
mkdir -p /var/db/nedi/rrd
ln -s /var/db/nedi/rrd %%WWWDIR%%/rrd
-
+
2. Change the directory to %%WWWDIR%%.
3. Initialize the MySQL database. NeDi will do this for you, just type
@@ -21,9 +20,8 @@ To make NeDi work, do the following:
5. Add a crontab entry like this:
-0 * * * * root %%WWWDIR%%/nedi.pl -c > /tmp/nedi.lastrun
+ 0 * * * * root %%WWWDIR%%/nedi.pl -c > /tmp/nedi.lastrun
6. Add an alias to Apache like this:
-Alias /nedi %%WWWDIR%%/html
-
+ Alias /nedi %%WWWDIR%%/html
diff --git a/net-mgmt/nedi/pkg-descr b/net-mgmt/nedi/pkg-descr
index a86128eaf83d..5183a2d206eb 100644
--- a/net-mgmt/nedi/pkg-descr
+++ b/net-mgmt/nedi/pkg-descr
@@ -1,5 +1,6 @@
-NeDi is a tool to discover and monitor you network devices. It sucks
-information through SNMP or CLI from your switches and routers and
+NeDi is a lightweight network management framework, which is based on a
+scheduled discovery, an SQL backend, and a web-based user interface. It
+sucks information through SNMP or CLI from your switches and routers and
stores information (such as MACs and IPs) in a MySQL database.
Later, you can use its web interface to easily locate nodes withing your
diff --git a/net-mgmt/nedi/pkg-plist b/net-mgmt/nedi/pkg-plist
index dff81b5e2fd7..02e096696ed4 100644
--- a/net-mgmt/nedi/pkg-plist
+++ b/net-mgmt/nedi/pkg-plist
@@ -1,5 +1,5 @@
-etc/nedi.conf.sample
-etc/nedi.seedlist.sample
+@sample etc/nedi.conf.sample
+@sample etc/nedi.seedlist.sample
%%WWWDIR%%/README
%%WWWDIR%%/contrib/1.3.6.1.4.1.3076.1.2.1.1.1.2.def
%%WWWDIR%%/contrib/1.3.6.1.4.1.3854.1.2.2.1.1.def