aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/ndpmon/Makefile37
-rw-r--r--net-mgmt/ndpmon/files/ndpmonitor.in2
-rw-r--r--net-mgmt/ndpmon/files/patch-create__html__table.py10
-rw-r--r--net-mgmt/ndpmon/pkg-descr2
-rw-r--r--net-mgmt/ndpmon/pkg-plist10
5 files changed, 41 insertions, 20 deletions
diff --git a/net-mgmt/ndpmon/Makefile b/net-mgmt/ndpmon/Makefile
index 52b27f416c67..6471c3256250 100644
--- a/net-mgmt/ndpmon/Makefile
+++ b/net-mgmt/ndpmon/Makefile
@@ -14,36 +14,53 @@ EXTRACT_SUFX= .tgz
MAINTAINER= janos.mohacsi@bsd.hu
COMMENT= On-link icmpv6 message monitoring and reporting daemon
+OPTIONS= PY4SUITE "Depend on py-4suite-xml (for generating HTML)" off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITHOUT_PY4SUITE)
+PLIST_SUB+= PY="@comment "
+.else
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Ft/Xml/Domlette.py:${PORTSDIR}/textproc/py-4suite-xml
+USE_PYTHON= 2.6+
+PLIST_SUB+= PY=""
+.endif
+
USE_GNOME= libxml2
USE_PERL5_RUN= yes
USE_RC_SUBR= ndpmonitor
GNU_CONFIGURE= yes
CONFIGURE_ENV= OSTYPE=FreeBSD
-CONFIGURE_ARGS= --with-var-datadir=${PREFIX}/var --with-confdir=${PREFIX}/etc
+CONFIGURE_ARGS= --with-var-datadir=${PREFIX}/var --with-confdir=${ETCDIR}
MAN8= ndpmon.8
PORTDOCS= INSTALL README
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/ndpmon.8 \
${WRKSRC}/create_html_table.py \
- ${WRKSRC}/demopipeprogram.pl.sample
+ ${WRKSRC}/demopipeprogram.pl.sample \
+ ${WRKSRC}/config_ndpmon.xml.in \
+ ${WRKSRC}/config_ndpmon.xml
(cd ${WRKSRC}; ${MAKE} clean)
do-install:
${INSTALL_MAN} ${WRKSRC}/ndpmon.8 ${PREFIX}/man/man8
${INSTALL_PROGRAM} ${WRKSRC}/ndpmon ${PREFIX}/sbin
+
${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/*.dtd \
- ${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/demopipeprogram.pl.sample \
- ${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/create_html_table.py \
- ${DATADIR}
- ${MKDIR} ${PREFIX}/etc/ndpmon
- ${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${PREFIX}/etc/ndpmon/config_ndpmon.xml-dist
+ ${INSTALL_DATA} ${WRKSRC}/*.dtd ${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/demopipeprogram.pl.sample ${DATADIR}
+.if defined(WITH_PY4SUITE)
+ ${INSTALL_SCRIPT} ${WRKSRC}/create_html_table.py ${DATADIR}
+.endif
+
+ ${MKDIR} ${ETCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${ETCDIR}/config_ndpmon.xml-dist
+
${MKDIR} ${PREFIX}/var/ndpmon
${INSTALL_DATA} ${WRKSRC}/neighbor_list.xml ${PREFIX}/var/ndpmon/neighbor_list.xml
diff --git a/net-mgmt/ndpmon/files/ndpmonitor.in b/net-mgmt/ndpmon/files/ndpmonitor.in
index 686deeab1650..8742713fcadf 100644
--- a/net-mgmt/ndpmon/files/ndpmonitor.in
+++ b/net-mgmt/ndpmon/files/ndpmonitor.in
@@ -12,7 +12,7 @@ name="ndpmonitor"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/ndpmon"
-required_files=%%PREFIX%%/etc/ndpmon/config_ndpmon.xml
+required_files=%%ETCDIR%%/config_ndpmon.xml
load_rc_config $name
diff --git a/net-mgmt/ndpmon/files/patch-create__html__table.py b/net-mgmt/ndpmon/files/patch-create__html__table.py
index a3dac0ac8439..daab3c3d8873 100644
--- a/net-mgmt/ndpmon/files/patch-create__html__table.py
+++ b/net-mgmt/ndpmon/files/patch-create__html__table.py
@@ -1,8 +1,14 @@
$FreeBSD$
---- create_html_table.py.orig
-+++ create_html_table.py
+--- create_html_table.py.orig 2010-12-18 23:33:50.000000000 +0100
++++ create_html_table.py 2010-12-18 23:35:24.000000000 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!%%LOCALBASE%%/bin/python
+
+ # takes in input the alerts via the pipe
+ # write the alerts in a file in XML format
@@ -11,7 +11,7 @@
from xml.dom import Node
diff --git a/net-mgmt/ndpmon/pkg-descr b/net-mgmt/ndpmon/pkg-descr
index 7215fdc0d5d1..2cdcc665e4be 100644
--- a/net-mgmt/ndpmon/pkg-descr
+++ b/net-mgmt/ndpmon/pkg-descr
@@ -8,5 +8,3 @@ by writing in the syslog and in some cases by sending an email
report.
WWW: http://ndpmon.sourceforge.net
-
-Janos Mohacsi <janos.mohacsi@bsd.hu>
diff --git a/net-mgmt/ndpmon/pkg-plist b/net-mgmt/ndpmon/pkg-plist
index fe4be9167efb..0a1be2c8adc7 100644
--- a/net-mgmt/ndpmon/pkg-plist
+++ b/net-mgmt/ndpmon/pkg-plist
@@ -1,11 +1,11 @@
+%%ETCDIR%%/config_ndpmon.xml-dist
sbin/ndpmon
%%DATADIR%%/config_ndpmon.dtd
-%%DATADIR%%/neighbor_list.dtd
%%DATADIR%%/demopipeprogram.pl.sample
-%%DATADIR%%/create_html_table.py
-@dirrmtry %%DATADIR%%
+%%DATADIR%%/neighbor_list.dtd
+%%PY%%%%DATADIR%%/create_html_table.py
var/ndpmon/neighbor_list.xml
@dirrmtry var/ndpmon
@dirrmtry var
-etc/ndpmon/config_ndpmon.xml-dist
-@dirrmtry etc/ndpmon
+@dirrmtry %%DATADIR%%
+@dirrmtry %%ETCDIR%%