public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/darkstat/
Date: Fri,  3 Jul 2020 09:55:05 +0000 (UTC)	[thread overview]
Message-ID: <1593770102.77ef284cc14f41f8cf32cb1122822d2c8cad7716.jer@gentoo> (raw)

commit:     77ef284cc14f41f8cf32cb1122822d2c8cad7716
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  3 09:17:32 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Jul  3 09:55:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ef284c

net-analyzer/darkstat: Add live ebuild

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-analyzer/darkstat/darkstat-9999999.ebuild | 73 +++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/net-analyzer/darkstat/darkstat-9999999.ebuild b/net-analyzer/darkstat/darkstat-9999999.ebuild
new file mode 100644
index 00000000000..a22c4018efb
--- /dev/null
+++ b/net-analyzer/darkstat/darkstat-9999999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools git-r3 user
+
+DESCRIPTION="Network traffic analyzer with cute web interface"
+HOMEPAGE="https://unix4lyfe.org/darkstat/"
+EGIT_REPO_URI="https://www.unix4lyfe.org/git/darkstat"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+
+DEPEND="
+	dev-libs/libbsd
+	net-libs/libpcap
+	sys-libs/zlib
+"
+RDEPEND="
+	${DEPEND}
+"
+DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat}
+DOCS=( AUTHORS ChangeLog README NEWS )
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.0.719-strncpy-off-by-one.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e '/-DNDEBUG/d' \
+		-e 's|-flto||g' \
+		configure.ac || die
+
+	eautoreconf
+}
+
+src_configure() {
+	econf --with-privdrop-user=darkstat
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/darkstat-initd darkstat
+	newconfd "${FILESDIR}"/darkstat-confd darkstat
+
+	sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die
+	sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die
+
+	keepdir "${DARKSTAT_CHROOT_DIR}"
+	chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}"
+}
+
+pkg_preinst() {
+	enewuser darkstat
+}
+
+pkg_postinst() {
+	# Workaround bug #141619
+	DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat`
+	chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}"
+
+	elog "To start different darkstat instances which will listen on a different"
+	elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to"
+	elog "darkstat script where 'if' is the name of the interface."
+	elog "Also in /etc/conf.d directory copy darkstat to darkstat.if"
+	elog "and edit it to change default values."
+	elog
+	elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\""
+}


             reply	other threads:[~2020-07-03  9:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  9:55 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-18 19:36 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/darkstat/ Arthur Zamarin
2022-05-05  1:35 Sam James
2022-05-04  4:23 Sam James
2022-05-04  4:23 Sam James
2022-05-04  4:23 Sam James
2021-03-15 22:02 Sam James
2021-03-15 21:54 Sam James
2021-03-15 21:25 Sam James
2021-03-15 21:25 Sam James
2020-10-03 15:30 David Seifert
2020-07-03 11:07 Jeroen Roovers
2020-07-03  9:55 Jeroen Roovers
2017-03-08  5:03 Jeroen Roovers
2017-02-24 14:07 Agostino Sarubbo
2017-02-22 16:08 Agostino Sarubbo
2017-02-22 15:06 Agostino Sarubbo
2017-02-21 23:55 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593770102.77ef284cc14f41f8cf32cb1122822d2c8cad7716.jer@gentoo \
    --to=jer@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox