summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-01-20 16:51:08 +0000
committerJeroen Roovers <jer@gentoo.org>2015-01-20 16:51:08 +0000
commit79e37b46991d69d0a63a2c229afbd3c7370fb080 (patch)
tree40c344794df89bb6f254ea9c8f30dc6ebb37415e /net-analyzer/vnstat
parentFinally fix underlinking, bug #370111 (diff)
downloadgentoo-2-79e37b46991d69d0a63a2c229afbd3c7370fb080.tar.gz
gentoo-2-79e37b46991d69d0a63a2c229afbd3c7370fb080.tar.bz2
gentoo-2-79e37b46991d69d0a63a2c229afbd3c7370fb080.zip
Version bump.
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-analyzer/vnstat')
-rw-r--r--net-analyzer/vnstat/ChangeLog10
-rw-r--r--net-analyzer/vnstat/files/vnstatd.initd-r138
-rw-r--r--net-analyzer/vnstat/vnstat-1.13.ebuild70
3 files changed, 116 insertions, 2 deletions
diff --git a/net-analyzer/vnstat/ChangeLog b/net-analyzer/vnstat/ChangeLog
index 9e86b434f880..02bc64913a7e 100644
--- a/net-analyzer/vnstat/ChangeLog
+++ b/net-analyzer/vnstat/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/vnstat
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/ChangeLog,v 1.68 2014/11/02 20:28:20 jer Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/ChangeLog,v 1.69 2015/01/20 16:51:08 jer Exp $
+
+*vnstat-1.13 (20 Jan 2015)
+
+ 20 Jan 2015; Jeroen Roovers <jer@gentoo.org> +vnstat-1.13.ebuild,
+ +files/vnstatd.initd-r1:
+ Version bump.
02 Nov 2014; Jeroen Roovers <jer@gentoo.org> vnstat-1.12.ebuild:
Add USE=selinux (bug #527916).
diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1
new file mode 100644
index 000000000000..4b8aa7a11080
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstatd.initd-r1
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/files/vnstatd.initd-r1,v 1.1 2015/01/20 16:51:08 jer Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ use net
+}
+
+VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/run/vnstatd/vnstatd.pid}"
+
+start() {
+ ebegin "Starting vnstatd"
+ checkpath -q -d -m 755 -o vnstat:vnstat /run/vnstatd
+ checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat
+ start-stop-daemon --start --quiet \
+ --pidfile "${VNSTATD_PIDFILE}" \
+ --user vnstat --group vnstat \
+ --nicelevel ${VNSTATD_NICELEVEL:-0} \
+ --exec /usr/bin/vnstatd -- \
+ -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping vnstatd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${VNSTATD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading vnstatd configuration"
+ kill -HUP $(cat "${VNSTATD_PIDFILE}") 2>&1 >/dev/null
+ eend $?
+}
diff --git a/net-analyzer/vnstat/vnstat-1.13.ebuild b/net-analyzer/vnstat/vnstat-1.13.ebuild
new file mode 100644
index 000000000000..46eff954aa5b
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.13.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/vnstat-1.13.ebuild,v 1.1 2015/01/20 16:51:08 jer Exp $
+
+EAPI=5
+inherit toolchain-funcs user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="http://humdi.net/vnstat/"
+SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gd selinux test"
+
+COMMON_DEPEND="
+ gd? ( media-libs/gd[png] )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-libs/check )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-vnstatd )
+"
+
+pkg_setup() {
+ enewgroup vnstat
+ enewuser vnstat -1 -1 /dev/null vnstat
+}
+
+src_prepare() {
+ tc-export CC
+
+ sed -i \
+ -e 's|vnstat[.]log|vnstatd.log|' \
+ -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \
+ -e 's|/var/run|/run|' \
+ cfg/${PN}.conf || die
+ sed -i \
+ -e '/PIDFILE/s|/var/run|/run|' \
+ src/common.h || die
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" $(usex gd all '')
+}
+
+src_install() {
+ use gd && dobin src/vnstati
+ dobin src/vnstat src/vnstatd
+
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}"/vnstat.cron vnstat
+
+ insinto /etc
+ doins cfg/vnstat.conf
+ fowners root:vnstat /etc/vnstat.conf
+
+ newconfd "${FILESDIR}"/vnstatd.confd vnstatd
+ newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd
+
+ use gd && doman man/vnstati.1
+ doman man/vnstat.1 man/vnstatd.1
+
+ newdoc INSTALL README.setup
+ dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
+}