# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
description console-based network traffic monitor
vnStat is a console-based network traffic monitor for Linux and BSD that keeps \
a log of network traffic for the selected interface(s), it uses the network \
interface statistics provided by the kernel as information source. This means \
that vnStat won't actually be sniffing any traffic and also ensures light use \
homepage http://humdi.net/vnstat/
master_sites http://humdi.net/${name}
checksums rmd160 368470756380fd5d1092abcb1614e06a2aa7d995 \
sha256 18e4c53576ca9e1ef2f0e063a6d83b0c44e3b1cf008560d658745df5c9aa7971
# fix occurrences of /var/db references in other files
reinplace "s|/var|${prefix}/var|g" ${worksrcpath}/src/common.h \
${worksrcpath}/cfg/vnstat.conf \
${worksrcpath}/man/vnstat.1 \
${worksrcpath}/man/vnstatd.1 \
${worksrcpath}/man/vnstati.1
reinplace "s|/var/lib|/var/db|g" ${worksrcpath}/man/vnstat.1 \
${worksrcpath}/man/vnstatd.1 \
${worksrcpath}/man/vnstati.1
# fix occurrences of /etc/db references in other files
reinplace "s|/etc|${prefix}/etc|g" ${worksrcpath}/man/vnstat.1 \
${worksrcpath}/man/vnstat.conf.5 \
${worksrcpath}/man/vnstatd.1 \
${worksrcpath}/man/vnstati.1 \
destroot.keepdirs ${destroot}${prefix}/var/db/vnstat
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
xinstall -m 644 -W ${worksrcpath} \
CHANGES COPYING FAQ INSTALL INSTALL_BSD README \
${destroot}${prefix}/share/doc/${name}
file copy {*}[glob ${worksrcpath}/examples/*] \
${destroot}${prefix}/share/examples/${name}
file delete -force ${destroot}${prefix}/share/examples/${name}/init.d
file delete -force ${destroot}${prefix}/share/examples/${name}/systemd
file delete -force ${destroot}${prefix}/share/examples/${name}/upstart
# Rename conf file so we don't clobber a user's real conf file on upgrade.
move ${destroot}${prefix}/etc/vnstat.conf ${destroot}${prefix}/etc/vnstat.conf.sample