svn commit: r321019 - in head/net-mgmt/ndpmon: . files

Stefan Walter stefan at FreeBSD.org
Sat Jun 15 21:38:45 UTC 2013


Author: stefan
Date: Sat Jun 15 21:38:43 2013
New Revision: 321019
URL: http://svnweb.freebsd.org/changeset/ports/321019

Log:
  - 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 at wenks.ch>
  Approved by:	maintainer timeout (>6 weeks)

Added:
  head/net-mgmt/ndpmon/pkg-message.MACRESOLV   (contents, props changed)
Modified:
  head/net-mgmt/ndpmon/Makefile
  head/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in   (contents, props changed)
  head/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in   (contents, props changed)
  head/net-mgmt/ndpmon/pkg-plist   (contents, props changed)

Modified: head/net-mgmt/ndpmon/Makefile
==============================================================================
--- head/net-mgmt/ndpmon/Makefile	Sat Jun 15 21:13:21 2013	(r321018)
+++ head/net-mgmt/ndpmon/Makefile	Sat Jun 15 21:38:43 2013	(r321019)
@@ -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>

Modified: head/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in
==============================================================================
--- head/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in	Sat Jun 15 21:13:21 2013	(r321018)
+++ head/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in	Sat Jun 15 21:38:43 2013	(r321019)
@@ -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>

Modified: head/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in
==============================================================================
--- head/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in	Sat Jun 15 21:13:21 2013	(r321018)
+++ head/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in	Sat Jun 15 21:38:43 2013	(r321019)
@@ -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"

Added: head/net-mgmt/ndpmon/pkg-message.MACRESOLV
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/ndpmon/pkg-message.MACRESOLV	Sat Jun 15 21:38:43 2013	(r321019)
@@ -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                       *
+*                                                               *
+*****************************************************************

Modified: head/net-mgmt/ndpmon/pkg-plist
==============================================================================
--- head/net-mgmt/ndpmon/pkg-plist	Sat Jun 15 21:13:21 2013	(r321018)
+++ head/net-mgmt/ndpmon/pkg-plist	Sat Jun 15 21:38:43 2013	(r321019)
@@ -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
+ at dirrmtry %%DATADIR%%/plugins/mac_resolv
+ at dirrmtry %%DATADIR%%/plugins
 @dirrmtry %%DATADIR%%
 @dirrmtry %%ETCDIR%%


More information about the svn-ports-head mailing list