diff -ru ndpmon.orig/Makefile ndpmon/Makefile --- ndpmon.orig/Makefile 2013-04-02 17:49:51.000000000 +0200 +++ ndpmon/Makefile 2013-06-13 14:29:52.000000000 +0200 @@ -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_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 @@ -45,8 +45,11 @@ .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 @@ .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 @@ ${MKDIR} ${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif +.if ${PORT_OPTIONS:MMACRESOLV} + @${CAT} ${PKGMESSAGE}.MACRESOLV +.endif .include diff -ru ndpmon.orig/files/patch-config__ndpmon.xml.in ndpmon/files/patch-config__ndpmon.xml.in --- ndpmon.orig/files/patch-config__ndpmon.xml.in 2013-04-02 17:49:51.000000000 +0200 +++ ndpmon/files/patch-config__ndpmon.xml.in 2013-06-10 00:42:02.000000000 +0200 @@ -1,8 +1,13 @@ - -$FreeBSD: head/net-mgmt/ndpmon/files/patch-config__ndpmon.xml.in 300897 2012-07-14 14:29:18Z beat $ - ---- 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 @@ + + +- ++ + + 1 + LOG_LOCAL1 @@ -8,12 +8,12 @@ 1 diff -ru ndpmon.orig/files/patch-ndpmon__defs.h.in ndpmon/files/patch-ndpmon__defs.h.in --- ndpmon.orig/files/patch-ndpmon__defs.h.in 2013-04-02 17:49:51.000000000 +0200 +++ ndpmon/files/patch-ndpmon__defs.h.in 2013-06-09 22:25:49.000000000 +0200 @@ -1,13 +1,12 @@ - -$FreeBSD: head/net-mgmt/ndpmon/files/patch-ndpmon__defs.h.in 300897 2012-07-14 14:29:18Z beat $ - ---- 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 -ru ndpmon.orig/pkg-message.MACRESOLV ndpmon/pkg-message.MACRESOLV --- ndpmon.orig/pkg-message.MACRESOLV 2013-06-10 21:40:33.000000000 +0200 +++ ndpmon/pkg-message.MACRESOLV 2013-06-10 00:28:23.000000000 +0200 @@ -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 -ru ndpmon.orig/pkg-plist ndpmon/pkg-plist --- ndpmon.orig/pkg-plist 2013-04-02 17:49:51.000000000 +0200 +++ ndpmon/pkg-plist 2013-06-09 23:29:31.000000000 +0200 @@ -4,8 +4,14 @@ %%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%%