diff options
author | Jeroen Roovers <jer@gentoo.org> | 2017-10-17 12:58:52 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2017-10-17 13:01:21 +0200 |
commit | 2cf8e0cb434c8736e3d37b5c08eeffb59e240505 (patch) | |
tree | 3e5df32f48c274f69259be3380249d7a354b8458 /net-analyzer/vnstat | |
parent | app-emulation/virtualbox-guest-additions: Use new patchset. (diff) | |
download | gentoo-2cf8e0cb434c8736e3d37b5c08eeffb59e240505.tar.gz gentoo-2cf8e0cb434c8736e3d37b5c08eeffb59e240505.tar.bz2 gentoo-2cf8e0cb434c8736e3d37b5c08eeffb59e240505.zip |
net-analyzer/vnstat: Add live ebuild.
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'net-analyzer/vnstat')
-rw-r--r-- | net-analyzer/vnstat/vnstat-9999.ebuild | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/net-analyzer/vnstat/vnstat-9999.ebuild b/net-analyzer/vnstat/vnstat-9999.ebuild new file mode 100644 index 000000000000..9e4b3546a2b2 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit git-r3 systemd user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/" +EGIT_REPO_URI="https://github.com/vergoh/vnstat" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +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 ) +" +PATCHES=( + "${FILESDIR}"/${PN}-1.17-conf.patch + "${FILESDIR}"/${PN}-1.17-drop-root.patch + "${FILESDIR}"/${PN}-1.17-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + 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 +} |