pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/vnstat vnStat is a network traffic monitor that ke...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ebb21655ac05
branches: trunk
changeset: 567504:ebb21655ac05
user: sborrill <sborrill%pkgsrc.org@localhost>
date: Thu Nov 19 15:48:19 2009 +0000
description:
vnStat is a network traffic monitor that keeps a log of daily network traffic
for the selected interface(s). vnStat isn't a packet sniffer. vnStat can be
used even without root permissions.
vnStat is focused on being small, simple and stable.
diffstat:
net/vnstat/DESCR | 5 +++
net/vnstat/MESSAGE | 7 ++++
net/vnstat/Makefile | 64 +++++++++++++++++++++++++++++++++++++++++++++
net/vnstat/PLIST | 9 ++++++
net/vnstat/distinfo | 5 +++
net/vnstat/files/vnstatd.sh | 20 ++++++++++++++
net/vnstat/options.mk | 19 +++++++++++++
7 files changed, 129 insertions(+), 0 deletions(-)
diffs (157 lines):
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/DESCR Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,5 @@
+vnStat is a network traffic monitor that keeps a log of daily network traffic
+for the selected interface(s). vnStat isn't a packet sniffer. vnStat can be
+used even without root permissions.
+
+vnStat is focused on being small, simple and stable.
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/MESSAGE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/MESSAGE Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+
+You must configure the network interfaces you wish to monitor in
+${PKG_SYSCONFDIR}/vnstat.conf before attempting to use this package.
+
+===========================================================================
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/Makefile Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,64 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+
+DISTNAME= vnstat-1.9
+CATEGORIES= net
+MASTER_SITES= http://humdi.net/vnstat/
+#DISTFILES=${DISTNAME}.tar.gz
+
+MAINTAINER= sborrill%NetBSD.org@localhost
+HOMEPAGE= http://humdi.net/vnstat/
+COMMENT= Small network traffic monitor
+LICENSE= gnu-gpl-v2
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= gmake
+
+VNSTAT_CONFIG= ${PKG_SYSCONFDIR}/vnstat.conf
+VNSTAT_EGDIR= ${PREFIX}/share/examples
+
+SUBST_CLASSES+= fix-dbpath
+SUBST_STAGE.fix-dbpath= pre-configure
+SUBST_MESSAGE.fix-dbpath= Fixing path to database files
+SUBST_FILES.fix-dbpath= src/common.h cfg/vnstat.conf
+SUBST_FILES.fix-dbpath+= man/vnstat.1 man/vnstatd.1
+SUBST_FILES.fix-dbpath+= man/vnstati.1
+SUBST_SED.fix-dbpath= -e 's,/var/lib/,${VARBASE}/db/,g'
+
+SUBST_CLASSES+= fix-etcpath
+SUBST_STAGE.fix-etcpath= pre-configure
+SUBST_MESSAGE.fix-etcpath= Fixing path to configuration files
+SUBST_FILES.fix-etcpath= src/cfg.c
+SUBST_FILES.fix-etcpath+= man/vnstat.1 man/vnstatd.1
+SUBST_FILES.fix-etcpath+= man/vnstati.1
+SUBST_SED.fix-etcpath= -e 's,/etc/,${PKG_SYSCONFDIR}/,g'
+
+CONF_FILES= ${VNSTAT_EGDIR}/vnstat.conf ${VNSTAT_CONFIG}
+
+RCD_SCRIPTS= vnstatd
+
+BUILD_DEFS+= VARBASE
+
+.include "options.mk"
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/vnstat \
+ ${DESTDIR}${PREFIX}/bin/vnstat
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/vnstatd \
+ ${DESTDIR}${PREFIX}/bin/vnstatd
+ ${INSTALL_DATA} ${WRKSRC}/cfg/vnstat.conf \
+ ${DESTDIR}${VNSTAT_EGDIR}/vnstat.conf
+ ${INSTALL_MAN} ${WRKSRC}/man/vnstat.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man1/vnstat.1
+ ${INSTALL_MAN} ${WRKSRC}/man/vnstatd.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man1/vnstatd.1
+ ${INSTALL_MAN} ${WRKSRC}/man/vnstat.conf.5 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man5/vnstat.conf.5
+ if [ "${PLIST.gd}" = "yes" ]; then \
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/vnstati \
+ ${DESTDIR}${PREFIX}/bin/vnstati; \
+ ${INSTALL_MAN} ${WRKSRC}/man/vnstati.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man1/vnstati.1; \
+ fi
+
+.include "../../mk/bsd.pkg.mk"
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/PLIST Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+bin/vnstat
+bin/vnstatd
+${PLIST.gd}bin/vnstati
+man/man1/vnstat.1
+man/man1/vnstatd.1
+${PLIST.gd}man/man1/vnstati.1
+share/examples/vnstat.conf
+share/examples/rc.d/vnstatd
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/distinfo Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+
+SHA1 (vnstat-1.9.tar.gz) = e415369053775855dd4f88a0b20b2a56cf3df290
+RMD160 (vnstat-1.9.tar.gz) = 5f9166b0c83b270ee9900dea171d54b693a29b61
+Size (vnstat-1.9.tar.gz) = 76166 bytes
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/files/vnstatd.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/files/vnstatd.sh Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,20 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: vnstatd.sh,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+#
+
+# PROVIDE: vnstatd
+# REQUIRE: network mountcritlocal
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="vnstatd"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="/var/run/${name}.pid"
+command_args="-d -p $pidfile"
+required_dirs="@VARBASE@/db/vnstat"
+required_files="@PKG_SYSCONFDIR@/vnstat.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r 98a1c609f218 -r ebb21655ac05 net/vnstat/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/vnstat/options.mk Thu Nov 19 15:48:19 2009 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1.1.1 2009/11/19 15:48:19 sborrill Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.vnstat
+PKG_SUPPORTED_OPTIONS= gd
+PKG_SUGGESTED_OPTIONS= gd
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS= gd
+###
+### Add support for image output
+###
+.if !empty(PKG_OPTIONS:Mgd)
+BUILD_TARGET= all
+PLIST.gd= yes
+.include "../../graphics/gd/buildlink3.mk"
+.else
+BUILD_TARGET=
+.endif
Home |
Main Index |
Thread Index |
Old Index