diff options
author | lawrance <lawrance@FreeBSD.org> | 2005-09-09 21:48:43 +0800 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2005-09-09 21:48:43 +0800 |
commit | ecff6bf8668946344525c6c90e40f582e89d1c7a (patch) | |
tree | 0d36f3a198fdf82d6b295b44e5735d1a32cb535b /net-mgmt/nfsen-devel | |
parent | db2248f1cbbc55130feb3ccb1d3e42e814ebc62c (diff) | |
download | freebsd-ports-gnome-ecff6bf8668946344525c6c90e40f582e89d1c7a.tar.gz freebsd-ports-gnome-ecff6bf8668946344525c6c90e40f582e89d1c7a.tar.zst freebsd-ports-gnome-ecff6bf8668946344525c6c90e40f582e89d1c7a.zip |
- Update to 1.2
- Switch to a more typical layout of files
PR: ports/85848
Submitted by: Janos Mohacsi <janos.mohacsi@bsd.hu> (maintainer)
Diffstat (limited to 'net-mgmt/nfsen-devel')
-rw-r--r-- | net-mgmt/nfsen-devel/Makefile | 32 | ||||
-rw-r--r-- | net-mgmt/nfsen-devel/distinfo | 4 | ||||
-rw-r--r-- | net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf | 73 | ||||
-rw-r--r-- | net-mgmt/nfsen-devel/files/patch-html_navigator.php | 14 | ||||
-rw-r--r-- | net-mgmt/nfsen-devel/files/patch-install.pl | 40 | ||||
-rw-r--r-- | net-mgmt/nfsen-devel/pkg-plist | 150 |
6 files changed, 237 insertions, 76 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: \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%% |