summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-12-24 23:08:01 +0100
committerJeroen Roovers <jer@gentoo.org>2015-12-24 23:08:31 +0100
commit0d1429038d695b9a290407950a8bb3c47232c326 (patch)
treeedd1d05b49e3688818f769397b63f1bcaf322552 /net-analyzer/vnstat/vnstat-1.15.ebuild
parentnet-analyzer/vnstat: Old. (diff)
downloadgentoo-0d1429038d695b9a290407950a8bb3c47232c326.tar.gz
gentoo-0d1429038d695b9a290407950a8bb3c47232c326.tar.bz2
gentoo-0d1429038d695b9a290407950a8bb3c47232c326.zip
net-analyzer/vnstat: Version bump (bug #569634).
Package-Manager: portage-2.2.26
Diffstat (limited to 'net-analyzer/vnstat/vnstat-1.15.ebuild')
-rw-r--r--net-analyzer/vnstat/vnstat-1.15.ebuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/net-analyzer/vnstat/vnstat-1.15.ebuild b/net-analyzer/vnstat/vnstat-1.15.ebuild
new file mode 100644
index 000000000000..140d8394138c
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.15.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ${PN} ${PN}d $(usex gd ${PN}i '')
+}
+
+src_install() {
+ use gd && dobin vnstati
+ dobin vnstat 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
+}