summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-10-23 12:52:18 +0200
committerJeroen Roovers <jer@gentoo.org>2018-10-23 12:56:39 +0200
commit5d3baa0d386a136181f05247ffa1ead0f03e65ff (patch)
tree2e2180978560fb6edaa0c6144b7ca87690b5f479 /net-analyzer
parentwww-client/vivaldi-snapshot: Old. (diff)
downloadgentoo-5d3baa0d386a136181f05247ffa1ead0f03e65ff.tar.gz
gentoo-5d3baa0d386a136181f05247ffa1ead0f03e65ff.tar.bz2
gentoo-5d3baa0d386a136181f05247ffa1ead0f03e65ff.zip
net-analyzer/vnstat: Version 2.0
Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/vnstat/Manifest1
-rw-r--r--net-analyzer/vnstat/vnstat-2.0.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest
index 719be2ce2db..4dd7c10b88c 100644
--- a/net-analyzer/vnstat/Manifest
+++ b/net-analyzer/vnstat/Manifest
@@ -1,2 +1,3 @@
DIST vnstat-1.17.tar.gz 238397 BLAKE2B 73aaffda3c91a1146b1d6a21f637272be227a15a7964aad90fb76c407c5f7fb0085e6f9f54408e8ebc667475c15f260d701c5924737f20921ebc0a35affd52be SHA512 c9c119a89054dacdc15026c766a20d88336d7689dd4264530d0347fcc58f3cbfc806b271e0f83e76c3b4a31ab793a628ee7d7b696943da919ee4cd2fdb481cc3
DIST vnstat-1.18.tar.gz 242502 BLAKE2B 2190c33ddf1c0a573e638234a94a86eb44fcc39e106ce8ece1f5ee5314dcc1efee237376ec109eb0873b9cf27ac3fe663526512f98a130114d417380bcb82a31 SHA512 4f9f08a57586bc57ede3d66802ee977c69b5f76ab42aa36e942e8d827dfce806dfc04916646fac01f57b026742a639fc5f7395b141a1c03ad11a1f977d02aa68
+DIST vnstat-2.0.tar.gz 259439 BLAKE2B f28f10962ae2acf04fc6669268bf5cf911ca2a5c77422b773f82a1ae25a0f90c2022aa5981c701bfa0246340113e24e0c3854174f6b3bee17d5474b9ba0916f0 SHA512 d5c9012b692adc9032ca1abde8619bd6a5de53c7c03b0fcae5b4b901c9769285a9de0b3a4f1bc21cfd74b96cfb10130a95e90cf179126ea676a777e1a9579a62
diff --git a/net-analyzer/vnstat/vnstat-2.0.ebuild b/net-analyzer/vnstat/vnstat-2.0.ebuild
new file mode 100644
index 00000000000..8838083fcd6
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-2.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit systemd user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="https://humdi.net/vnstat/"
+SRC_URI="https://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="
+ dev-db/sqlite
+ 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
+}