aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/netdisco
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-06-24 11:19:03 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2013-06-24 11:19:03 +0000
commit6ee3774e4673ffdb67610e2b3fbab0efbf6bb5fb (patch)
tree06b9176734bb48549a7a460d97a0d943d172460a /net-mgmt/netdisco
parent3d67d2607cc530ead16110c0128a7bd8722be742 (diff)
downloadports-6ee3774e4673ffdb67610e2b3fbab0efbf6bb5fb.tar.gz
ports-6ee3774e4673ffdb67610e2b3fbab0efbf6bb5fb.zip
Notes
Diffstat (limited to 'net-mgmt/netdisco')
-rw-r--r--net-mgmt/netdisco/Makefile13
-rw-r--r--net-mgmt/netdisco/distinfo4
-rw-r--r--net-mgmt/netdisco/files/netdisco.in3
-rw-r--r--net-mgmt/netdisco/files/pkg-message.in7
-rw-r--r--net-mgmt/netdisco/pkg-plist15
5 files changed, 32 insertions, 10 deletions
diff --git a/net-mgmt/netdisco/Makefile b/net-mgmt/netdisco/Makefile
index 22e40e96e362..337036ae95dc 100644
--- a/net-mgmt/netdisco/Makefile
+++ b/net-mgmt/netdisco/Makefile
@@ -2,15 +2,15 @@
# $FreeBSD$
PORTNAME= netdisco
-PORTVERSION= 1.2
+PORTVERSION= 1.3
CATEGORIES= net-mgmt www
MASTER_SITES= SF
MAINTAINER= dgeo@centrale-marseille.fr
COMMENT= Web-based network management tool for moderate to large networks
-OPTIONS_DEFINE= GRAPHVIZ MIBS
-OPTIONS_DEFAULT=GRAPHVIZ MIBS
+OPTIONS_DEFINE= DOCS GRAPHVIZ MIBS
+OPTIONS_DEFAULT=DOCS GRAPHVIZ MIBS
MIBS_DESC= Depend on net-mgmt/netdisco-mibs
GRAPHVIZ_DESC= Install GraphViz for network map support
@@ -54,7 +54,7 @@ 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
+DOCFILES= ChangeLog doc/*.pod INSTALL README* UPGRADE
.include <bsd.port.pre.mk>
@@ -86,6 +86,7 @@ pre-install:
${REINPLACE_CMD} -e 's#%%WWWDIR%%#${WWWDIR}#g' \
-e 's#%%PREFIX%%#${PREFIX}#g' \
-e 's#%%DATADIR%%#${DATADIR}#g' \
+ -e 's#%%DOCSDIR%%#${DOCSDIR}#g' \
-e 's#%%NETDISCO_RUNDIR%%#${NETDISCO_RUNDIR}#g' \
-e 's#%%NETDISCO_USER%%#${USERS}#g' \
-e 's#%%NETDISCO_GROUP%%#${GROUPS}#g' \
@@ -145,6 +146,10 @@ do-install:
. endif
post-install:
+. if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_MAN} ${DOCFILES} ${DOCSDIR})
+. endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/net-mgmt/netdisco/distinfo b/net-mgmt/netdisco/distinfo
index 03152d68947b..5cb51e100dc1 100644
--- a/net-mgmt/netdisco/distinfo
+++ b/net-mgmt/netdisco/distinfo
@@ -1,2 +1,2 @@
-SHA256 (netdisco-1.2.tar.gz) = 18af19b5753eb752edf9d4fb7e8865628ac35cf7b60266c7d50da020e9994a1f
-SIZE (netdisco-1.2.tar.gz) = 1349238
+SHA256 (netdisco-1.3.tar.gz) = 8d69caa95ec3f62ca2ed886883447b9cfa63908188a2fe20bfefb27b860c2d72
+SIZE (netdisco-1.3.tar.gz) = 1350999
diff --git a/net-mgmt/netdisco/files/netdisco.in b/net-mgmt/netdisco/files/netdisco.in
index 84da57b2b6dd..b75e338f9abd 100644
--- a/net-mgmt/netdisco/files/netdisco.in
+++ b/net-mgmt/netdisco/files/netdisco.in
@@ -25,13 +25,12 @@ status_cmd=${name}_status
command="%%PREFIX%%/bin/netdisco"
command_interpreter="/usr/bin/perl"
netdisco_config="%%ETCDIR%%/netdisco.conf"
-pidfile=$(grep ^daemon_pid $netdisco_config | sed -E 's/.*=\s+//')
+pidfile=$(grep ^daemon_pid $netdisco_config | cut -d= -f2 | tail -1)
flags="-p start"
required_files="$netdisco_config"
netdisco_prestart() {
- test -d ${pidfile%/*} || install -d -m 0700 -o $netdisco_user -g $netdisco_group ${pidfile%/*}
touch $pidfile && chown $netdisco_user $pidfile
test -d %%NETDISCO_DBDIR%% || install -d -m 0700 -o $netdisco_user -g $netdisco_group %%NETDISCO_DBDIR%%
}
diff --git a/net-mgmt/netdisco/files/pkg-message.in b/net-mgmt/netdisco/files/pkg-message.in
index 32d44a8a35a8..a4a96fcdc2cc 100644
--- a/net-mgmt/netdisco/files/pkg-message.in
+++ b/net-mgmt/netdisco/files/pkg-message.in
@@ -4,13 +4,18 @@ Netdisco has been installed.
In order to get up and running, there are a few more steps to complete:
1) Examine all the configuration files in %%ETCDIR%%,
- and modify them to suit your needs.
+ and modify them to suit your needs.
+ (check diff to the .sample if upgrading)
2) You should consider downloading a fresh OUI database
# fetch -o %%DATADIR%%/oui.txt http://standards.ieee.org/develop/regauth/oui/oui.txt
3) Run the following to create and initialise the netdisco database:
# perl %%DATADIR%%/sql/pg --init
+ OR (if upgrading)
+ 3bis) Check %%DOCSDIR%%/ChangeLog and
+ %%DOCSDIR%%/UPGRADE%% and act accordingly
+ (databases upgrades are in %%DATADIR%%/sql)
4) Add an initial admin user:
# su %%NETDISCO_USER%% -c "netdisco -u"
diff --git a/net-mgmt/netdisco/pkg-plist b/net-mgmt/netdisco/pkg-plist
index 927a97c8ed88..c0741b7aec40 100644
--- a/net-mgmt/netdisco/pkg-plist
+++ b/net-mgmt/netdisco/pkg-plist
@@ -34,6 +34,7 @@ bin/port_control
%%DATADIR%%/sql/upgrade-0.95-to-1.0.sql
%%DATADIR%%/sql/upgrade-1.0-to-1.1.sql
%%DATADIR%%/sql/upgrade-1.1-to-1.2.sql
+%%DATADIR%%/sql/upgrade-1.2-to-1.3.sql
%%DATADIR%%/sql/user_log.sql
%%DATADIR%%/sql/users.sql
%%DATADIR%%/Makefile
@@ -57,7 +58,6 @@ bin/port_control
%%WWWDIR%%/device_module_search.html
%%WWWDIR%%/device_search.html
%%WWWDIR%%/discoball2.gif
-%%WWWDIR%%/doc/ChangeLog.txt
%%WWWDIR%%/doc/index.html
%%WWWDIR%%/doc/netdisco-api-backend.html
%%WWWDIR%%/doc/netdisco-api-shared.html
@@ -100,6 +100,18 @@ bin/port_control
%%WWWDIR%%/traffic.png
%%WWWDIR%%/graphs_sample.mas
%%WWWDIR%%/port_search.html
+%%DOCSDIR%%/ChangeLog
+%%DOCSDIR%%/DiscoveryDatabase.pod
+%%DOCSDIR%%/INSTALL.pod
+%%DOCSDIR%%/IPv6ArpNip.pod
+%%DOCSDIR%%/README.pod
+%%DOCSDIR%%/UPGRADE.pod
+%%DOCSDIR%%/WISHLIST.pod
+%%DOCSDIR%%/INSTALL
+%%DOCSDIR%%/README
+%%DOCSDIR%%/README-API-BACKEND
+%%DOCSDIR%%/README-API-SHARED
+%%DOCSDIR%%/UPGRADE
@unexec d="%D/%%ETCDIR%%"; f="netdisco.conf"; if cmp -s ${d}/${f}.sample ${d}/${f}; then rm -f ${d}/${f}; fi;
%%ETCDIR%%/netdisco.conf.sample
@exec if [ ! -f %%ETCDIR%%/netdisco.conf ] ; then cp -p %%ETCDIR%%/netdisco.conf.sample %%ETCDIR%%/netdisco.conf; fi
@@ -123,4 +135,5 @@ bin/port_control
@dirrm %%DATADIR%%/sql
@dirrmtry %%DATADIR%%
@dirrmtry %%ETCDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@exec mkdir -p %D/%%WWWDIR%%/mason