mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-analyzer/goaccess: changes in live ebuild
In accordance to https://github.com/gentoo/gentoo/pull/26693 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> Closes: https://github.com/gentoo/gentoo/pull/27109 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
committed by
Joonas Niilola
parent
5c820de80e
commit
506ad4e312
@@ -1,51 +1,72 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
EGIT_REPO_URI="https://github.com/allinurl/${PN}.git"
|
||||
|
||||
if [[ ${PV} = *9999* ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/allinurl/${PN}.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://tar.goaccess.io/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux"
|
||||
fi
|
||||
inherit autotools git-r3 optfeature systemd tmpfiles
|
||||
|
||||
DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal"
|
||||
DESCRIPTION="A real-time web log analyzer and interactive viewer in a terminal"
|
||||
HOMEPAGE="https://goaccess.io"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="debug geoip geoipv2 getline ssl unicode"
|
||||
REQUIRED_USE="geoipv2? ( geoip )"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
RDEPEND="sys-libs/ncurses:=[unicode(+)?]
|
||||
RDEPEND="acct-group/goaccess
|
||||
acct-user/goaccess
|
||||
sys-libs/ncurses:=[unicode(+)?]
|
||||
geoip? (
|
||||
!geoipv2? ( dev-libs/geoip )
|
||||
geoipv2? ( dev-libs/libmaxminddb:0= )
|
||||
)
|
||||
ssl? (
|
||||
dev-libs/openssl:0=
|
||||
)"
|
||||
ssl? ( dev-libs/openssl:0= )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Change path to GeoIP bases in config
|
||||
sed -i -e s':/usr/local:/usr:' config/goaccess.conf || die "sed failed for goaccess.conf"
|
||||
# Enable log-format, define log file and db path,
|
||||
# change path to GeoIP bases in config
|
||||
sed -i -e '/log-format COMBINED/s/#//' \
|
||||
-e '/log-file/s/#//' \
|
||||
-e '/db-path/s|tmp|var/lib/goaccess|' \
|
||||
-e '/geoip-database/s|local/||' config/goaccess.conf \
|
||||
|| die "sed failed for goaccess.conf"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
"$(use_enable debug)" \
|
||||
"$(use_enable geoip geoip "$(usex geoipv2 mmdb legacy)")" \
|
||||
"$(use_enable unicode utf8)" \
|
||||
"$(use_with getline)" \
|
||||
"$(use_with ssl openssl)"
|
||||
local myeconfargs=()
|
||||
readarray -t myeconfargs < <(
|
||||
use_enable debug
|
||||
use_enable geoip geoip "$(usex geoipv2 mmdb legacy)"
|
||||
use_enable unicode utf8
|
||||
use_with getline
|
||||
use_with ssl openssl
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newinitd "${FILESDIR}"/goaccess.initd goaccess
|
||||
newconfd "${FILESDIR}"/goaccess.confd goaccess
|
||||
systemd_dounit "${FILESDIR}"/goaccess.service
|
||||
newtmpfiles "${FILESDIR}"/goaccess.tmpfile goaccess.conf
|
||||
|
||||
diropts -o goaccess -g goaccess -m 0700
|
||||
keepdir /var/lib/goaccess/db /var/log/goaccess
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "update GeoIP databases" net-misc/geoipupdate
|
||||
tmpfiles_process goaccess.conf
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user