aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2005-09-09 13:48:43 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2005-09-09 13:48:43 +0000
commit11b8f27c2241d7b2c131f12dabc34a28a6d1126b (patch)
treecb44ae8835d00ec1953d15ec2f6fb15fd3be2076 /net-mgmt
parent8bdaf978b41ba3fc3ac065fc2af66a718d12d975 (diff)
downloadports-11b8f27c2241d7b2c131f12dabc34a28a6d1126b.tar.gz
ports-11b8f27c2241d7b2c131f12dabc34a28a6d1126b.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nfsen-devel/Makefile32
-rw-r--r--net-mgmt/nfsen-devel/distinfo4
-rw-r--r--net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf73
-rw-r--r--net-mgmt/nfsen-devel/files/patch-html_navigator.php14
-rw-r--r--net-mgmt/nfsen-devel/files/patch-install.pl40
-rw-r--r--net-mgmt/nfsen-devel/pkg-plist150
-rw-r--r--net-mgmt/nfsen/Makefile32
-rw-r--r--net-mgmt/nfsen/distinfo4
-rw-r--r--net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf73
-rw-r--r--net-mgmt/nfsen/files/patch-html_navigator.php14
-rw-r--r--net-mgmt/nfsen/files/patch-install.pl40
-rw-r--r--net-mgmt/nfsen/pkg-plist150
12 files changed, 474 insertions, 152 deletions
diff --git a/net-mgmt/nfsen-devel/Makefile b/net-mgmt/nfsen-devel/Makefile
index 0f8ac033dc4c..478412ee4f0e 100644
--- a/net-mgmt/nfsen-devel/Makefile
+++ b/net-mgmt/nfsen-devel/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= nfsen
-PORTVERSION= 1.1r3
+PORTVERSION= 1.2
CATEGORIES= net-mgmt
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
+ http://nfsen.sourceforge.net/
MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTNAME= ${PORTNAME}-${PORTVERSION:S/r/rc/}
MAINTAINER= janos.mohacsi@bsd.hu
COMMENT= Web based frontend to nfdump netflow collector
@@ -23,14 +23,28 @@ USE_ICONV= yes
USE_PERL5= yes
USE_PHP= session pcre
NO_BUILD= yes
+USE_REINPLACE= yes
+PLIST_SUB+= PORTNAME=${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+pre-everything::
+.if ${PERL_LEVEL} < 500600
+IGNORE= This backage requires at least perl 5.6.0
+.endif
do-configure:
- @${SED} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/etc/nfsen-dist.conf > \
- ${WRKSRC}/etc/nfsen.conf
+ ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' -e 's,%%PORTNAME%%,${PORTNAME},' \
+ ${WRKSRC}/etc/nfsen-dist.conf
+ ${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' ${WRKSRC}/install.pl
do-install:
- @${MKDIR} -m 755 ${PREFIX}/${PORTNAME}
- cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl
- @${ECHO_MSG} "Configure your etc/nfsen.conf correctly to have necessary profiles ";
+ ${MKDIR} ${PREFIX}/var/${PORTNAME}/profiles/live
+ cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf
+ @${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary profiles ";
+ @${ECHO_MSG} "Then run 'make reconfigure' to correctly setup profile files";
+
+reconfigure:
+ cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${LOCALBASE}/etc/nfsen.conf
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-mgmt/nfsen-devel/distinfo b/net-mgmt/nfsen-devel/distinfo
index 2612df873a6d..93c5651ca62c 100644
--- a/net-mgmt/nfsen-devel/distinfo
+++ b/net-mgmt/nfsen-devel/distinfo
@@ -1,2 +1,2 @@
-MD5 (nfsen-1.1rc3.tar.gz) = 38b595aa6e4013a444ea48fbabd478a6
-SIZE (nfsen-1.1rc3.tar.gz) = 2654426
+MD5 (nfsen-1.2.tar.gz) = 3130b5735244660213ab3b14e769584b
+SIZE (nfsen-1.2.tar.gz) = 3330324
diff --git a/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf b/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
index e6c7910b88f0..999891b1f352 100644
--- a/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
+++ b/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
@@ -3,16 +3,59 @@ $FreeBSD$
--- etc/nfsen-dist.conf.orig
+++ etc/nfsen-dist.conf
-@@ -20,7 +20,7 @@
- # NfSen base directory: Home of NfSen
- # contains all scripts, modules and profile directories:
- # bin, libexec, var, profiles
+@@ -26,7 +26,7 @@
+
+ #
+ # Required for default layout
-$BASEDIR = "/data/nfsen";
-+$BASEDIR = "/%%PREFIX%%/nfsen";
++$BASEDIR = "%%PREFIX%%";
+
+ #
+ # Where to install the NfSen binaries
+@@ -34,7 +34,7 @@
- # nfdump tools path
- $PREFIX = '/usr/local/bin';
-@@ -30,7 +30,7 @@
+ #
+ # Where to install the NfSen Perl modules
+-$LIBEXECDIR="${BASEDIR}/libexec";
++$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%/";
+
+ #
+ # Where to install the config files
+@@ -44,7 +44,7 @@
+ # NfSen html pages directory:
+ # All php scripts will be installed here.
+ # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
+-$HTMLDIR = "/var/www/nfsen/";
++$HTMLDIR = "%%PREFIX%%/www/%%PORTNAME%%/";
+
+ #
+ # Where to install the docs
+@@ -52,20 +52,20 @@
+
+ #
+ # Var space for NfSen
+-$VARDIR="${BASEDIR}/var";
++$VARDIR="${BASEDIR}/var/%%PORTNAME%%";
+
+ #
+ # The Profiles stat directory, where all profile information
+ # RRD DBs and gif pictures of the profile are stored
+-$PROFILESTATDIR="${BASEDIR}/profiles";
++$PROFILESTATDIR="${VARDIR}/profiles";
+
+ #
+ # The Profiles directory, where all netflow data is stored
+-$PROFILEDATADIR="${BASEDIR}/profiles";
++$PROFILEDATADIR="${VARDIR}/profiles";
+
+ #
+ # Where go all the backend plugins
+-$BACKEND_PLUGINDIR="${BASEDIR}/plugins";
++$BACKEND_PLUGINDIR="${LIBEXECDIR}/plugins";
+
+ #
+ # Where go all the frontend plugins
+@@ -82,7 +82,7 @@
# This may be a different or the same uid than your web server.
# Note: This user must be in group $WWWGROUP, otherwise nfcapd
# is not able to write data files!
@@ -21,22 +64,12 @@ $FreeBSD$
# user and group of the web server process
# All netflow processing will be done with this user
-@@ -52,15 +52,15 @@
- # Ident strings must be 1 to 19 characters long only, containing characters [a-zA-Z0-9_].
+@@ -105,7 +105,7 @@
%sources = (
-- 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
+ 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
- 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
-+# 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
+# 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
);
#
- # NfSen html pages directory:
- # All php scripts will be installed here.
- # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
--$HTMLDIR = "/var/www/nfsen/";
-+$HTMLDIR = "/%%PREFIX%%/www/nfsen/";
-
- #
- # Low water mark: When expiring files, delete files until
diff --git a/net-mgmt/nfsen-devel/files/patch-html_navigator.php b/net-mgmt/nfsen-devel/files/patch-html_navigator.php
new file mode 100644
index 000000000000..9249f8afc3d2
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-html_navigator.php
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- html/navigator.php.orig
++++ html/navigator.php
+@@ -18,7 +18,7 @@
+ * Copy the doc directory into HTML dir
+ */
+
+- // print "<a href='$DOCURL/NfSen.html' target='_blank' >Docu</a>\n";
++ print "<a href='$DOCURL/NfSen.html' target='_blank' >Docu</a>\n";
+
+ print "<a href='$self?bookmark=" . $_SESSION['bookmark'] . "'>Bookmark URL</a>\n";
+ print "Selected Profile:&nbsp;\n";
diff --git a/net-mgmt/nfsen-devel/files/patch-install.pl b/net-mgmt/nfsen-devel/files/patch-install.pl
new file mode 100644
index 000000000000..6aabeb302540
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-install.pl
@@ -0,0 +1,40 @@
+
+$FreeBSD$
+
+--- install.pl.orig
++++ install.pl
+@@ -56,33 +56,7 @@
+ # Get Perl
+ sub GetPerl {
+
+- my $whichperl;
+- my $ans;
+- chomp($whichperl = `which perl`);
+- if ( length $whichperl ) {
+- print "Perl to use: [$whichperl] ";
+- chomp($ans = <STDIN>);
+- if ( length $ans ) {
+- $whichperl = $ans;
+- }
+- } else {
+- print "No Perl found in PATH. Please specify where to find perl [] ";
+- chomp($whichperl = <STDIN>);
+- }
+-
+- while (1) {
+- if ( -x $whichperl ) {
+- my $err = system("$whichperl -e 'require 5.6.0;'") >> 8;
+- last if $err == 0;
+- print "Found errors while testing Perl\n";
+- } else {
+- print "No executable: '$whichperl'\n";
+- }
+- print "Perl to use: [] ";
+- chomp($whichperl = <STDIN>);
+- }
+-
+- return $whichperl;
++ return "%%PERL%%";
+
+ } # End of GetPerl
+
diff --git a/net-mgmt/nfsen-devel/pkg-plist b/net-mgmt/nfsen-devel/pkg-plist
index e774c812bd25..d389246bbf28 100644
--- a/net-mgmt/nfsen-devel/pkg-plist
+++ b/net-mgmt/nfsen-devel/pkg-plist
@@ -1,45 +1,105 @@
-nfsen/bin/GenGraph.pl
-nfsen/bin/nfsen
-nfsen/bin/nfsen-run
-nfsen/bin/nfsen.rc
-nfsen/bin/testPlugin
-nfsen/etc/nfsen-dist.conf
-nfsen/etc/nfsen-dist.conf.orig
-nfsen/etc/nfsen-shell-param
-nfsen/etc/nfsen.conf
-nfsen/libexec/Log.pm
-nfsen/libexec/NfConf.pm
-nfsen/libexec/NfProfile.pm
-nfsen/libexec/NfSen.pm
-nfsen/libexec/NfSenRRD.pm
-nfsen/libexec/Notification.pm
-nfsen/libexec/PluginTemplate.pm
-nfsen/libexec/demoplugin.pm
-nfsen/profiles/live/profile.dat
-www/nfsen/conf.php
-www/nfsen/css-admin.html
-www/nfsen/css.html
-www/nfsen/details.php
-www/nfsen/edit.png
-www/nfsen/info.php
-www/nfsen/invisible.gif
-www/nfsen/navigator.php
-www/nfsen/nfsen.php
-www/nfsen/nfsenutil.php
-www/nfsen/overview.php
-www/nfsen/pic.gif
-www/nfsen/pic.php
-www/nfsen/process.php
-www/nfsen/profileadmin.php
-www/nfsen/rrdgraph.php
-www/nfsen/trash.png
-@dirrm www/nfsen
-@dirrm nfsen/var/run
-@dirrm nfsen/var/filters
-@dirrm nfsen/var
-@dirrm nfsen/profiles/live
-@dirrm nfsen/profiles
-@dirrm nfsen/libexec
-@dirrm nfsen/etc
-@dirrm nfsen/bin
-@dirrm nfsen
+bin/nfsen
+bin/nfsen-run
+bin/nfsen.rc
+bin/pid_check.pl
+bin/testPlugin
+etc/nfsen-dist.conf
+etc/nfsen-dist.conf.orig
+@exec [ -f %D/etc/nfsen.conf ] || cp %D/etc/nfsen-dist.conf %D/etc/nfsen.conf
+libexec/%%PORTNAME%%/GenGraph.pl
+libexec/%%PORTNAME%%/Log.pm
+libexec/%%PORTNAME%%/NfConf.pm
+libexec/%%PORTNAME%%/NfProfile.pm
+libexec/%%PORTNAME%%/NfSen.pm
+libexec/%%PORTNAME%%/NfSenRRD.pm
+libexec/%%PORTNAME%%/Notification.pm
+libexec/%%PORTNAME%%/plugins/demoplugin.pm
+www/%%PORTNAME%%/conf.php
+www/%%PORTNAME%%/EmptyGraph.gif
+www/%%PORTNAME%%/ErrorGraph.gif
+www/%%PORTNAME%%/css-admin.html
+www/%%PORTNAME%%/css.html
+www/%%PORTNAME%%/details.php
+www/%%PORTNAME%%/edit.png
+www/%%PORTNAME%%/info.php
+www/%%PORTNAME%%/invisible.gif
+www/%%PORTNAME%%/navigator.php
+www/%%PORTNAME%%/navigator.php.orig
+www/%%PORTNAME%%/nfsen.php
+www/%%PORTNAME%%/nfsenutil.php
+www/%%PORTNAME%%/overview.php
+www/%%PORTNAME%%/pic.php
+www/%%PORTNAME%%/process.php
+www/%%PORTNAME%%/profileadmin.php
+www/%%PORTNAME%%/rrdgraph.php
+www/%%PORTNAME%%/trash.png
+www/%%PORTNAME%%/plugins/demoplugin.php
+www/%%PORTNAME%%/doc/BSD-license.html
+www/%%PORTNAME%%/doc/Bookmark.png
+www/%%PORTNAME%%/doc/BuildingProfile.png
+www/%%PORTNAME%%/doc/ConfirmDelete.png
+www/%%PORTNAME%%/doc/DefaultFilter.png
+www/%%PORTNAME%%/doc/DeleteProfile.png
+www/%%PORTNAME%%/doc/DisabledSources.png
+www/%%PORTNAME%%/doc/InputEnd.png
+www/%%PORTNAME%%/doc/Navigating.png
+www/%%PORTNAME%%/doc/NewProfile.png
+www/%%PORTNAME%%/doc/NfSen.html
+www/%%PORTNAME%%/doc/OutOfData.png
+www/%%PORTNAME%%/doc/ProcessingControls.png
+www/%%PORTNAME%%/doc/ProcessingOutput.png
+www/%%PORTNAME%%/doc/ProfileCreated.png
+www/%%PORTNAME%%/doc/ResetWindow.png
+www/%%PORTNAME%%/doc/SelectLeft.png
+www/%%PORTNAME%%/doc/SelectRight.png
+www/%%PORTNAME%%/doc/StatSummary.png
+www/%%PORTNAME%%/doc/TimeWindow.png
+www/%%PORTNAME%%/doc/WinScale.png
+www/%%PORTNAME%%/doc/bytes.png
+www/%%PORTNAME%%/doc/cursor_control.png
+www/%%PORTNAME%%/doc/details-graphs.png
+www/%%PORTNAME%%/doc/details-processing.png
+www/%%PORTNAME%%/doc/dirstruct.png
+www/%%PORTNAME%%/doc/edit.png
+www/%%PORTNAME%%/doc/exiisting.png
+www/%%PORTNAME%%/doc/flows.png
+www/%%PORTNAME%%/doc/linegraph.png
+www/%%PORTNAME%%/doc/nfsen-options.png
+www/%%PORTNAME%%/doc/overview.png
+www/%%PORTNAME%%/doc/packets.png
+www/%%PORTNAME%%/doc/plugins.png
+www/%%PORTNAME%%/doc/processing-1.png
+www/%%PORTNAME%%/doc/selectprofile.png
+www/%%PORTNAME%%/doc/stat.png
+www/%%PORTNAME%%/doc/views-2.png
+www/%%PORTNAME%%/doc/views.png
+@dirrm www/%%PORTNAME%%/plugins
+@dirrm www/%%PORTNAME%%/doc
+@dirrm www/%%PORTNAME%%
+@exec mkdir -p %D/var/%%PORTNAME%%/profiles/live/upstream1
+var/%%PORTNAME%%/profiles/live/flows.rrd
+var/%%PORTNAME%%/profiles/live/flows_tcp.rrd
+var/%%PORTNAME%%/profiles/live/flows_udp.rrd
+var/%%PORTNAME%%/profiles/live/flows_icmp.rrd
+var/%%PORTNAME%%/profiles/live/flows_other.rrd
+var/%%PORTNAME%%/profiles/live/packets.rrd
+var/%%PORTNAME%%/profiles/live/packets_tcp.rrd
+var/%%PORTNAME%%/profiles/live/packets_udp.rrd
+var/%%PORTNAME%%/profiles/live/packets_icmp.rrd
+var/%%PORTNAME%%/profiles/live/packets_other.rrd
+var/%%PORTNAME%%/profiles/live/traffic.rrd
+var/%%PORTNAME%%/profiles/live/traffic_tcp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_udp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_icmp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_other.rrd
+var/%%PORTNAME%%/profiles/live/profile.dat
+@exec mkdir -p %D/var/%%PORTNAME%%/run
+@exec mkdir -p %D/var/%%PORTNAME%%/filters
+@dirrm var/%%PORTNAME%%/run
+@dirrm var/%%PORTNAME%%/filters
+@unexec rmdir %D/var/%%PORTNAME%%/profiles/live/upstream1 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%%/profiles/live 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%%/profiles 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%% 2>/dev/null || true
+@dirrm libexec/%%PORTNAME%%/plugins
+@dirrm libexec/%%PORTNAME%%
diff --git a/net-mgmt/nfsen/Makefile b/net-mgmt/nfsen/Makefile
index 0f8ac033dc4c..478412ee4f0e 100644
--- a/net-mgmt/nfsen/Makefile
+++ b/net-mgmt/nfsen/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= nfsen
-PORTVERSION= 1.1r3
+PORTVERSION= 1.2
CATEGORIES= net-mgmt
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
+ http://nfsen.sourceforge.net/
MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTNAME= ${PORTNAME}-${PORTVERSION:S/r/rc/}
MAINTAINER= janos.mohacsi@bsd.hu
COMMENT= Web based frontend to nfdump netflow collector
@@ -23,14 +23,28 @@ USE_ICONV= yes
USE_PERL5= yes
USE_PHP= session pcre
NO_BUILD= yes
+USE_REINPLACE= yes
+PLIST_SUB+= PORTNAME=${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+pre-everything::
+.if ${PERL_LEVEL} < 500600
+IGNORE= This backage requires at least perl 5.6.0
+.endif
do-configure:
- @${SED} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/etc/nfsen-dist.conf > \
- ${WRKSRC}/etc/nfsen.conf
+ ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' -e 's,%%PORTNAME%%,${PORTNAME},' \
+ ${WRKSRC}/etc/nfsen-dist.conf
+ ${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' ${WRKSRC}/install.pl
do-install:
- @${MKDIR} -m 755 ${PREFIX}/${PORTNAME}
- cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl
- @${ECHO_MSG} "Configure your etc/nfsen.conf correctly to have necessary profiles ";
+ ${MKDIR} ${PREFIX}/var/${PORTNAME}/profiles/live
+ cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf
+ @${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary profiles ";
+ @${ECHO_MSG} "Then run 'make reconfigure' to correctly setup profile files";
+
+reconfigure:
+ cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${LOCALBASE}/etc/nfsen.conf
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-mgmt/nfsen/distinfo b/net-mgmt/nfsen/distinfo
index 2612df873a6d..93c5651ca62c 100644
--- a/net-mgmt/nfsen/distinfo
+++ b/net-mgmt/nfsen/distinfo
@@ -1,2 +1,2 @@
-MD5 (nfsen-1.1rc3.tar.gz) = 38b595aa6e4013a444ea48fbabd478a6
-SIZE (nfsen-1.1rc3.tar.gz) = 2654426
+MD5 (nfsen-1.2.tar.gz) = 3130b5735244660213ab3b14e769584b
+SIZE (nfsen-1.2.tar.gz) = 3330324
diff --git a/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf b/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
index e6c7910b88f0..999891b1f352 100644
--- a/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
+++ b/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
@@ -3,16 +3,59 @@ $FreeBSD$
--- etc/nfsen-dist.conf.orig
+++ etc/nfsen-dist.conf
-@@ -20,7 +20,7 @@
- # NfSen base directory: Home of NfSen
- # contains all scripts, modules and profile directories:
- # bin, libexec, var, profiles
+@@ -26,7 +26,7 @@
+
+ #
+ # Required for default layout
-$BASEDIR = "/data/nfsen";
-+$BASEDIR = "/%%PREFIX%%/nfsen";
++$BASEDIR = "%%PREFIX%%";
+
+ #
+ # Where to install the NfSen binaries
+@@ -34,7 +34,7 @@
- # nfdump tools path
- $PREFIX = '/usr/local/bin';
-@@ -30,7 +30,7 @@
+ #
+ # Where to install the NfSen Perl modules
+-$LIBEXECDIR="${BASEDIR}/libexec";
++$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%/";
+
+ #
+ # Where to install the config files
+@@ -44,7 +44,7 @@
+ # NfSen html pages directory:
+ # All php scripts will be installed here.
+ # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
+-$HTMLDIR = "/var/www/nfsen/";
++$HTMLDIR = "%%PREFIX%%/www/%%PORTNAME%%/";
+
+ #
+ # Where to install the docs
+@@ -52,20 +52,20 @@
+
+ #
+ # Var space for NfSen
+-$VARDIR="${BASEDIR}/var";
++$VARDIR="${BASEDIR}/var/%%PORTNAME%%";
+
+ #
+ # The Profiles stat directory, where all profile information
+ # RRD DBs and gif pictures of the profile are stored
+-$PROFILESTATDIR="${BASEDIR}/profiles";
++$PROFILESTATDIR="${VARDIR}/profiles";
+
+ #
+ # The Profiles directory, where all netflow data is stored
+-$PROFILEDATADIR="${BASEDIR}/profiles";
++$PROFILEDATADIR="${VARDIR}/profiles";
+
+ #
+ # Where go all the backend plugins
+-$BACKEND_PLUGINDIR="${BASEDIR}/plugins";
++$BACKEND_PLUGINDIR="${LIBEXECDIR}/plugins";
+
+ #
+ # Where go all the frontend plugins
+@@ -82,7 +82,7 @@
# This may be a different or the same uid than your web server.
# Note: This user must be in group $WWWGROUP, otherwise nfcapd
# is not able to write data files!
@@ -21,22 +64,12 @@ $FreeBSD$
# user and group of the web server process
# All netflow processing will be done with this user
-@@ -52,15 +52,15 @@
- # Ident strings must be 1 to 19 characters long only, containing characters [a-zA-Z0-9_].
+@@ -105,7 +105,7 @@
%sources = (
-- 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
+ 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
- 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
-+# 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
+# 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
);
#
- # NfSen html pages directory:
- # All php scripts will be installed here.
- # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
--$HTMLDIR = "/var/www/nfsen/";
-+$HTMLDIR = "/%%PREFIX%%/www/nfsen/";
-
- #
- # Low water mark: When expiring files, delete files until
diff --git a/net-mgmt/nfsen/files/patch-html_navigator.php b/net-mgmt/nfsen/files/patch-html_navigator.php
new file mode 100644
index 000000000000..9249f8afc3d2
--- /dev/null
+++ b/net-mgmt/nfsen/files/patch-html_navigator.php
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- html/navigator.php.orig
++++ html/navigator.php
+@@ -18,7 +18,7 @@
+ * Copy the doc directory into HTML dir
+ */
+
+- // print "<a href='$DOCURL/NfSen.html' target='_blank' >Docu</a>\n";
++ print "<a href='$DOCURL/NfSen.html' target='_blank' >Docu</a>\n";
+
+ print "<a href='$self?bookmark=" . $_SESSION['bookmark'] . "'>Bookmark URL</a>\n";
+ print "Selected Profile:&nbsp;\n";
diff --git a/net-mgmt/nfsen/files/patch-install.pl b/net-mgmt/nfsen/files/patch-install.pl
new file mode 100644
index 000000000000..6aabeb302540
--- /dev/null
+++ b/net-mgmt/nfsen/files/patch-install.pl
@@ -0,0 +1,40 @@
+
+$FreeBSD$
+
+--- install.pl.orig
++++ install.pl
+@@ -56,33 +56,7 @@
+ # Get Perl
+ sub GetPerl {
+
+- my $whichperl;
+- my $ans;
+- chomp($whichperl = `which perl`);
+- if ( length $whichperl ) {
+- print "Perl to use: [$whichperl] ";
+- chomp($ans = <STDIN>);
+- if ( length $ans ) {
+- $whichperl = $ans;
+- }
+- } else {
+- print "No Perl found in PATH. Please specify where to find perl [] ";
+- chomp($whichperl = <STDIN>);
+- }
+-
+- while (1) {
+- if ( -x $whichperl ) {
+- my $err = system("$whichperl -e 'require 5.6.0;'") >> 8;
+- last if $err == 0;
+- print "Found errors while testing Perl\n";
+- } else {
+- print "No executable: '$whichperl'\n";
+- }
+- print "Perl to use: [] ";
+- chomp($whichperl = <STDIN>);
+- }
+-
+- return $whichperl;
++ return "%%PERL%%";
+
+ } # End of GetPerl
+
diff --git a/net-mgmt/nfsen/pkg-plist b/net-mgmt/nfsen/pkg-plist
index e774c812bd25..d389246bbf28 100644
--- a/net-mgmt/nfsen/pkg-plist
+++ b/net-mgmt/nfsen/pkg-plist
@@ -1,45 +1,105 @@
-nfsen/bin/GenGraph.pl
-nfsen/bin/nfsen
-nfsen/bin/nfsen-run
-nfsen/bin/nfsen.rc
-nfsen/bin/testPlugin
-nfsen/etc/nfsen-dist.conf
-nfsen/etc/nfsen-dist.conf.orig
-nfsen/etc/nfsen-shell-param
-nfsen/etc/nfsen.conf
-nfsen/libexec/Log.pm
-nfsen/libexec/NfConf.pm
-nfsen/libexec/NfProfile.pm
-nfsen/libexec/NfSen.pm
-nfsen/libexec/NfSenRRD.pm
-nfsen/libexec/Notification.pm
-nfsen/libexec/PluginTemplate.pm
-nfsen/libexec/demoplugin.pm
-nfsen/profiles/live/profile.dat
-www/nfsen/conf.php
-www/nfsen/css-admin.html
-www/nfsen/css.html
-www/nfsen/details.php
-www/nfsen/edit.png
-www/nfsen/info.php
-www/nfsen/invisible.gif
-www/nfsen/navigator.php
-www/nfsen/nfsen.php
-www/nfsen/nfsenutil.php
-www/nfsen/overview.php
-www/nfsen/pic.gif
-www/nfsen/pic.php
-www/nfsen/process.php
-www/nfsen/profileadmin.php
-www/nfsen/rrdgraph.php
-www/nfsen/trash.png
-@dirrm www/nfsen
-@dirrm nfsen/var/run
-@dirrm nfsen/var/filters
-@dirrm nfsen/var
-@dirrm nfsen/profiles/live
-@dirrm nfsen/profiles
-@dirrm nfsen/libexec
-@dirrm nfsen/etc
-@dirrm nfsen/bin
-@dirrm nfsen
+bin/nfsen
+bin/nfsen-run
+bin/nfsen.rc
+bin/pid_check.pl
+bin/testPlugin
+etc/nfsen-dist.conf
+etc/nfsen-dist.conf.orig
+@exec [ -f %D/etc/nfsen.conf ] || cp %D/etc/nfsen-dist.conf %D/etc/nfsen.conf
+libexec/%%PORTNAME%%/GenGraph.pl
+libexec/%%PORTNAME%%/Log.pm
+libexec/%%PORTNAME%%/NfConf.pm
+libexec/%%PORTNAME%%/NfProfile.pm
+libexec/%%PORTNAME%%/NfSen.pm
+libexec/%%PORTNAME%%/NfSenRRD.pm
+libexec/%%PORTNAME%%/Notification.pm
+libexec/%%PORTNAME%%/plugins/demoplugin.pm
+www/%%PORTNAME%%/conf.php
+www/%%PORTNAME%%/EmptyGraph.gif
+www/%%PORTNAME%%/ErrorGraph.gif
+www/%%PORTNAME%%/css-admin.html
+www/%%PORTNAME%%/css.html
+www/%%PORTNAME%%/details.php
+www/%%PORTNAME%%/edit.png
+www/%%PORTNAME%%/info.php
+www/%%PORTNAME%%/invisible.gif
+www/%%PORTNAME%%/navigator.php
+www/%%PORTNAME%%/navigator.php.orig
+www/%%PORTNAME%%/nfsen.php
+www/%%PORTNAME%%/nfsenutil.php
+www/%%PORTNAME%%/overview.php
+www/%%PORTNAME%%/pic.php
+www/%%PORTNAME%%/process.php
+www/%%PORTNAME%%/profileadmin.php
+www/%%PORTNAME%%/rrdgraph.php
+www/%%PORTNAME%%/trash.png
+www/%%PORTNAME%%/plugins/demoplugin.php
+www/%%PORTNAME%%/doc/BSD-license.html
+www/%%PORTNAME%%/doc/Bookmark.png
+www/%%PORTNAME%%/doc/BuildingProfile.png
+www/%%PORTNAME%%/doc/ConfirmDelete.png
+www/%%PORTNAME%%/doc/DefaultFilter.png
+www/%%PORTNAME%%/doc/DeleteProfile.png
+www/%%PORTNAME%%/doc/DisabledSources.png
+www/%%PORTNAME%%/doc/InputEnd.png
+www/%%PORTNAME%%/doc/Navigating.png
+www/%%PORTNAME%%/doc/NewProfile.png
+www/%%PORTNAME%%/doc/NfSen.html
+www/%%PORTNAME%%/doc/OutOfData.png
+www/%%PORTNAME%%/doc/ProcessingControls.png
+www/%%PORTNAME%%/doc/ProcessingOutput.png
+www/%%PORTNAME%%/doc/ProfileCreated.png
+www/%%PORTNAME%%/doc/ResetWindow.png
+www/%%PORTNAME%%/doc/SelectLeft.png
+www/%%PORTNAME%%/doc/SelectRight.png
+www/%%PORTNAME%%/doc/StatSummary.png
+www/%%PORTNAME%%/doc/TimeWindow.png
+www/%%PORTNAME%%/doc/WinScale.png
+www/%%PORTNAME%%/doc/bytes.png
+www/%%PORTNAME%%/doc/cursor_control.png
+www/%%PORTNAME%%/doc/details-graphs.png
+www/%%PORTNAME%%/doc/details-processing.png
+www/%%PORTNAME%%/doc/dirstruct.png
+www/%%PORTNAME%%/doc/edit.png
+www/%%PORTNAME%%/doc/exiisting.png
+www/%%PORTNAME%%/doc/flows.png
+www/%%PORTNAME%%/doc/linegraph.png
+www/%%PORTNAME%%/doc/nfsen-options.png
+www/%%PORTNAME%%/doc/overview.png
+www/%%PORTNAME%%/doc/packets.png
+www/%%PORTNAME%%/doc/plugins.png
+www/%%PORTNAME%%/doc/processing-1.png
+www/%%PORTNAME%%/doc/selectprofile.png
+www/%%PORTNAME%%/doc/stat.png
+www/%%PORTNAME%%/doc/views-2.png
+www/%%PORTNAME%%/doc/views.png
+@dirrm www/%%PORTNAME%%/plugins
+@dirrm www/%%PORTNAME%%/doc
+@dirrm www/%%PORTNAME%%
+@exec mkdir -p %D/var/%%PORTNAME%%/profiles/live/upstream1
+var/%%PORTNAME%%/profiles/live/flows.rrd
+var/%%PORTNAME%%/profiles/live/flows_tcp.rrd
+var/%%PORTNAME%%/profiles/live/flows_udp.rrd
+var/%%PORTNAME%%/profiles/live/flows_icmp.rrd
+var/%%PORTNAME%%/profiles/live/flows_other.rrd
+var/%%PORTNAME%%/profiles/live/packets.rrd
+var/%%PORTNAME%%/profiles/live/packets_tcp.rrd
+var/%%PORTNAME%%/profiles/live/packets_udp.rrd
+var/%%PORTNAME%%/profiles/live/packets_icmp.rrd
+var/%%PORTNAME%%/profiles/live/packets_other.rrd
+var/%%PORTNAME%%/profiles/live/traffic.rrd
+var/%%PORTNAME%%/profiles/live/traffic_tcp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_udp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_icmp.rrd
+var/%%PORTNAME%%/profiles/live/traffic_other.rrd
+var/%%PORTNAME%%/profiles/live/profile.dat
+@exec mkdir -p %D/var/%%PORTNAME%%/run
+@exec mkdir -p %D/var/%%PORTNAME%%/filters
+@dirrm var/%%PORTNAME%%/run
+@dirrm var/%%PORTNAME%%/filters
+@unexec rmdir %D/var/%%PORTNAME%%/profiles/live/upstream1 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%%/profiles/live 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%%/profiles 2>/dev/null || true
+@unexec rmdir %D/var/%%PORTNAME%% 2>/dev/null || true
+@dirrm libexec/%%PORTNAME%%/plugins
+@dirrm libexec/%%PORTNAME%%