diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-04 04:53:47 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-04 04:53:47 +0000 |
commit | d074d0ba59e3121dba0c27c4a18f1e481f67b62a (patch) | |
tree | acee0c96401da7cf239aa11858cb707d4e5ce930 /net-analyzer/goaccess/goaccess-1.8.1.ebuild | |
parent | a8594a52da11d6e6e42aec90d9658f5fda35a77c (diff) |
gentoo auto-resync : 04:12:2023 - 04:53:47
Diffstat (limited to 'net-analyzer/goaccess/goaccess-1.8.1.ebuild')
-rw-r--r-- | net-analyzer/goaccess/goaccess-1.8.1.ebuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/net-analyzer/goaccess/goaccess-1.8.1.ebuild b/net-analyzer/goaccess/goaccess-1.8.1.ebuild new file mode 100644 index 000000000000..483e675fa316 --- /dev/null +++ b/net-analyzer/goaccess/goaccess-1.8.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# shellcheck disable=SC2207 + +EAPI=8 + +inherit autotools optfeature systemd tmpfiles + +DESCRIPTION="A real-time web log analyzer and interactive viewer in a terminal" +HOMEPAGE="https://goaccess.io" +SRC_URI="https://tar.goaccess.io/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug geoip geoipv2 getline ssl unicode" +REQUIRED_USE="geoipv2? ( geoip )" + +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= )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + # 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() { + local 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 +} |