summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-04 05:22:46 +0100
committerSam James <sam@gentoo.org>2022-05-04 05:22:46 +0100
commite62359063839dad95ddbf367340f1782b7a8298b (patch)
tree3a7fb48240a6184f75452da30d9de43ddfe854d8
parentnet-analyzer/darkstat: add github upstream metadata (diff)
downloadgentoo-e62359063839dad95ddbf367340f1782b7a8298b.tar.gz
gentoo-e62359063839dad95ddbf367340f1782b7a8298b.tar.bz2
gentoo-e62359063839dad95ddbf367340f1782b7a8298b.zip
net-analyzer/darkstat: add 3.0.721
xxd no longer needed for live ebuilds either. Reported-by: Corvus Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-analyzer/darkstat/Manifest1
-rw-r--r--net-analyzer/darkstat/darkstat-3.0.721.ebuild80
-rw-r--r--net-analyzer/darkstat/darkstat-9999999.ebuild8
3 files changed, 84 insertions, 5 deletions
diff --git a/net-analyzer/darkstat/Manifest b/net-analyzer/darkstat/Manifest
index 0614aa5c743d..72513312afdc 100644
--- a/net-analyzer/darkstat/Manifest
+++ b/net-analyzer/darkstat/Manifest
@@ -1 +1,2 @@
DIST darkstat-3.0.719.tar.bz2 117695 BLAKE2B b2aef3073aafaa42d006fd9ade652ea3542a5f238e347b219ee30e995915fa38b005161d26dff6a9a3e01e98b426ec14c32e1390592128d5816278e5f895f178 SHA512 264f6c5f862745fbfb5d125aae5a319369f028fd7be96cfb12775147f528a36b7f5a42bcd6434f2d376933292364641f2ec9cd9bdb1fe105f5a905e331181f98
+DIST darkstat-3.0.721.tar.gz 104050 BLAKE2B 1005bd3e40be59ad214c95908b34e70eb8b60e33a9b85ee3f6b7fa7f8f6691fad73234ef228ec529aaad0e8ad9eb07f0bdb9d08a560103af3cb377fd11765436 SHA512 077eec3cc69b021966d4545f408a7444136cedb8be1dbae96fb1ce94d9bcd3a1db3bf4ea1bed8999088b24f7e2ed333d1166fe39bf974f32772b8c8f6fde707c
diff --git a/net-analyzer/darkstat/darkstat-3.0.721.ebuild b/net-analyzer/darkstat/darkstat-3.0.721.ebuild
new file mode 100644
index 000000000000..dcd53be61eb1
--- /dev/null
+++ b/net-analyzer/darkstat/darkstat-3.0.721.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Network traffic analyzer with cute web interface"
+HOMEPAGE="https://unix4lyfe.org/darkstat/"
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="https://github.com/emikulic/darkstat"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/emikulic/darkstat/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND="acct-user/darkstat
+ dev-libs/libbsd
+ net-libs/libpcap
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat}
+
+DOCS=( AUTHORS ChangeLog README.md 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}"
+ fowners darkstat:0 "${DARKSTAT_CHROOT_DIR}"
+}
+
+pkg_postinst() {
+ # Workaround bug #141619
+ DARKSTAT_CHROOT_DIR=$(
+ sed -n 's/^#CHROOT=\(.*\)/\1/p' "${EROOT}"/etc/conf.d/darkstat
+ )
+
+ if [[ -n "${DARKSTAT_CHROOT_DIR}" ]] && [[ "${DARKSTAT_CHROOT_DIR}" != "${EROOT:-/}" ]] ; then
+ chown darkstat:0 "${EROOT}/${DARKSTAT_CHROOT_DIR#/}/"
+ fi
+
+ elog "To start different darkstat instances which will listen on a different"
+ elog "interface, create within the ${EROOT}/etc/init.d directory a 'darkstat.if' symlink to"
+ elog "darkstat script where 'if' is the name of the interface."
+ elog "Also in the ${EROOT}/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: ${EROOT}/${DARKSTAT_CHROOT_DIR#/}"
+}
diff --git a/net-analyzer/darkstat/darkstat-9999999.ebuild b/net-analyzer/darkstat/darkstat-9999999.ebuild
index 1274c0c32950..dcd53be61eb1 100644
--- a/net-analyzer/darkstat/darkstat-9999999.ebuild
+++ b/net-analyzer/darkstat/darkstat-9999999.ebuild
@@ -8,18 +8,16 @@ inherit autotools
DESCRIPTION="Network traffic analyzer with cute web interface"
HOMEPAGE="https://unix4lyfe.org/darkstat/"
if [[ ${PV} == *9999* ]] ; then
- EGIT_REPO_URI="https://www.unix4lyfe.org/git/darkstat"
+ EGIT_REPO_URI="https://github.com/emikulic/darkstat"
inherit git-r3
else
- SRC_URI="https://unix4lyfe.org/${PN}/${P}.tar.bz2"
+ SRC_URI="https://github.com/emikulic/darkstat/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~ppc ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
-# The live ebuild requires xxd to generate favicon.h.
-BDEPEND="app-editors/vim-core"
DEPEND="acct-user/darkstat
dev-libs/libbsd
net-libs/libpcap
@@ -28,7 +26,7 @@ RDEPEND="${DEPEND}"
DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat}
-DOCS=( AUTHORS ChangeLog README NEWS )
+DOCS=( AUTHORS ChangeLog README.md NEWS )
PATCHES=(
"${FILESDIR}"/${PN}-3.0.719-strncpy-off-by-one.patch