aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorstefan <stefan@FreeBSD.org>2013-06-16 05:38:43 +0800
committerstefan <stefan@FreeBSD.org>2013-06-16 05:38:43 +0800
commit59c698fcacc84e08ad133503886af22a58cc13be (patch)
tree2acf190eed7a41a64d515c74c36750e87fe65360 /net-mgmt
parent281b100f8de7fab297711aa303a2b1c0add68257 (diff)
downloadfreebsd-ports-graphics-59c698fcacc84e08ad133503886af22a58cc13be.tar.gz
freebsd-ports-graphics-59c698fcacc84e08ad133503886af22a58cc13be.tar.zst
freebsd-ports-graphics-59c698fcacc84e08ad133503886af22a58cc13be.zip
- Fix/improve use of option MACRESOLV:
- Register www/p5-libwww as a dependency. - Install missing files. - Print a message how to update the MAC database after installation. - Fix path of the configuration file. PR: 169716 Submitted by: Fabian Wenk <fabian@wenks.ch> Approved by: maintainer timeout (>6 weeks)
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/ndpmon/Makefile18
-rw-r--r--net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in15
-rw-r--r--net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in13
-rw-r--r--net-mgmt/ndpmon/pkg-message.MACRESOLV10
-rw-r--r--net-mgmt/ndpmon/pkg-plist6
5 files changed, 47 insertions, 15 deletions
diff --git a/net-mgmt/ndpmon/Makefile b/net-mgmt/ndpmon/Makefile
index b1033c5d12d..88d773a3290 100644
--- a/net-mgmt/ndpmon/Makefile
+++ b/net-mgmt/ndpmon/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ndpmon
PORTVERSION= 1.4.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt ipv6
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-1.4/
EXTRACT_SUFX= .tgz
@@ -18,7 +18,7 @@ OPTIONS_DEFINE= PY4SUITE MACRESOLV
OPTIONS_DEFAULT=
PY4SUITE_DESC= Depend on py-4suite-xml (for generating HTML)
-MACRESOLV_DESC= Enable MAC Manufacturer Resolution
+MACRESOLV_DESC= Enable MAC Manufacturer Resolution (use p5-libwww)
.include <bsd.port.options.mk>
@@ -45,8 +45,11 @@ PORTDOCS= INSTALL README
.if ${PORT_OPTIONS:MMACRESOLV}
CONFIGURE_ARGS+=--enable-mac-resolv
+BUILD_DEPENDS+= p5-libwww>=6.05:${PORTSDIR}/www/p5-libwww
+RUN_DEPENDS+= p5-libwww>=6.05:${PORTSDIR}/www/p5-libwww
+PLIST_SUB+= MACRESOLV=""
.else
-CONFIGURE_ARGS+=--disable-mac-resolv
+PLIST_SUB+= MACRESOLV="@comment "
.endif
post-patch:
@@ -69,6 +72,12 @@ do-install:
.if ${PORT_OPTIONS:MPY4SUITE}
${INSTALL_SCRIPT} ${WRKSRC}/create_html_table.py ${DATADIR}
.endif
+.if ${PORT_OPTIONS:MMACRESOLV}
+ ${MKDIR} ${DATADIR}/plugins/mac_resolv
+ ${INSTALL_SCRIPT} ${WRKSRC}/plugins/mac_resolv/make-manuf ${DATADIR}/plugins/mac_resolv
+ ${INSTALL_DATA} ${WRKSRC}/plugins/mac_resolv/*.tmpl ${DATADIR}/plugins/mac_resolv
+ ${INSTALL_DATA} ${WRKSRC}/plugins/mac_resolv/manuf ${DATADIR}/plugins/mac_resolv
+.endif
${MKDIR} ${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${ETCDIR}/config_ndpmon.xml-dist
@@ -81,5 +90,8 @@ post-install:
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
+.if ${PORT_OPTIONS:MMACRESOLV}
+ @${CAT} ${PKGMESSAGE}.MACRESOLV
+.endif
.include <bsd.port.mk>
diff --git a/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in b/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in
index 417495cc1b6..5fba3db3cb2 100644
--- a/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in
+++ b/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in
@@ -1,8 +1,13 @@
-
-$FreeBSD$
-
---- config_ndpmon.xml.in.orig
-+++ config_ndpmon.xml.in
+--- config_ndpmon.xml.in.orig 2009-08-13 11:22:21.000000000 +0200
++++ config_ndpmon.xml.in 2013-06-10 00:36:17.000000000 +0200
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <?xml-stylesheet type="text/xsl" href="config.xsl" ?>
+-<!DOCTYPE config_ndpmon SYSTEM "@CONFDIR@/ndpmon/config_ndpmon.dtd">
++<!DOCTYPE config_ndpmon SYSTEM "%%PREFIX%%/share/ndpmon/config_ndpmon.dtd">
+ <config_ndpmon>
+ <ignor_autoconf>1</ignor_autoconf>
+ <syslog_facility>LOG_LOCAL1</syslog_facility>
@@ -8,12 +8,12 @@
<actions_low_pri>
<sendmail>1</sendmail>
diff --git a/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in b/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in
index 77aaf9cf973..cefe28b9f97 100644
--- a/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in
+++ b/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in
@@ -1,13 +1,12 @@
-
-$FreeBSD$
-
---- ndpmon_defs.h.in.orig
-+++ ndpmon_defs.h.in
-@@ -10,11 +10,11 @@
+--- ndpmon_defs.h.in.orig 2009-08-13 11:22:21.000000000 +0200
++++ ndpmon_defs.h.in 2013-06-09 22:25:30.000000000 +0200
+@@ -9,12 +9,12 @@
+ #include "./plugins/mac_resolv/mac_resolv.h"
#endif
- #define _CONFIG_PATH_ "@CONFDIR@/ndpmon/config_ndpmon.xml"
+-#define _CONFIG_PATH_ "@CONFDIR@/ndpmon/config_ndpmon.xml"
-#define _CONFIG_DTD_PATH_ "@CONFDIR@/ndpmon/config_ndpmon.dtd"
++#define _CONFIG_PATH_ "@prefix@/etc/ndpmon/config_ndpmon.xml"
+#define _CONFIG_DTD_PATH_ "@prefix@/share/ndpmon/config_ndpmon.dtd"
#define _CACHE_PATH_ "@VARDATADIR@/ndpmon/neighbor_list.xml"
-#define _CACHE_DTD_PATH_ "@VARDATADIR@/ndpmon/neighbor_list.dtd"
diff --git a/net-mgmt/ndpmon/pkg-message.MACRESOLV b/net-mgmt/ndpmon/pkg-message.MACRESOLV
new file mode 100644
index 00000000000..60fd9b2a51e
--- /dev/null
+++ b/net-mgmt/ndpmon/pkg-message.MACRESOLV
@@ -0,0 +1,10 @@
+
+*****************************************************************
+* *
+* To update to local MAC database run the following commands: *
+* *
+* cd /usr/local/share/ndpmon/plugins/mac_resolv/ *
+* ./make-manuf *
+* /usr/local/etc/rc.d/ndpmonitor restart *
+* *
+*****************************************************************
diff --git a/net-mgmt/ndpmon/pkg-plist b/net-mgmt/ndpmon/pkg-plist
index 0a1be2c8adc..d7c45b2012a 100644
--- a/net-mgmt/ndpmon/pkg-plist
+++ b/net-mgmt/ndpmon/pkg-plist
@@ -4,8 +4,14 @@ sbin/ndpmon
%%DATADIR%%/demopipeprogram.pl.sample
%%DATADIR%%/neighbor_list.dtd
%%PY%%%%DATADIR%%/create_html_table.py
+%%MACRESOLV%%%%DATADIR%%/plugins/mac_resolv/make-manuf
+%%MACRESOLV%%%%DATADIR%%/plugins/mac_resolv/manuf.tmpl
+%%MACRESOLV%%%%DATADIR%%/plugins/mac_resolv/wka.tmpl
+%%MACRESOLV%%%%DATADIR%%/plugins/mac_resolv/manuf
var/ndpmon/neighbor_list.xml
@dirrmtry var/ndpmon
@dirrmtry var
+@dirrmtry %%DATADIR%%/plugins/mac_resolv
+@dirrmtry %%DATADIR%%/plugins
@dirrmtry %%DATADIR%%
@dirrmtry %%ETCDIR%%