commit:     0140b6a984244cf0ca79878be814e8c7811ae059
Author:     Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp 
<DOT> ua>
AuthorDate: Mon Aug  1 07:23:06 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Aug 17 16:43:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0140b6a9

net-analyzer/goaccess: version bump to 1.6.2

Closes: https://bugs.gentoo.org/842240

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua>
Closes: https://github.com/gentoo/gentoo/pull/26693
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/goaccess/Manifest               |  1 +
 net-analyzer/goaccess/files/goaccess.confd   |  8 ++++
 net-analyzer/goaccess/files/goaccess.initd   | 14 ++++++
 net-analyzer/goaccess/files/goaccess.service | 15 ++++++
 net-analyzer/goaccess/files/goaccess.tmpfile |  1 +
 net-analyzer/goaccess/goaccess-1.6.2.ebuild  | 70 ++++++++++++++++++++++++++++
 6 files changed, 109 insertions(+)

diff --git a/net-analyzer/goaccess/Manifest b/net-analyzer/goaccess/Manifest
index 8449602d0ea3..66d5ef3979d3 100644
--- a/net-analyzer/goaccess/Manifest
+++ b/net-analyzer/goaccess/Manifest
@@ -1 +1,2 @@
 DIST goaccess-1.4.2.tar.gz 633162 BLAKE2B 
4da268bb051114893b480e4eef18e007ccffb9b61ae49cc9a96622864716a44793f0895b5d27685e1b5e22c33f1bdd256dc148d26c7b6fefbd982a3f8fdf1960
 SHA512 
14bc5a08c2e6bb1db8d664a224b778603a358cf3a52a341a3a3e04e84337d0bb574892cb5005dc62098a8a6f0a834d1014479c29593714fdd6a87cedb3f3fb38
+DIST goaccess-1.6.2.tar.gz 658679 BLAKE2B 
93aea3e4142ec2fa8ea4b1600bac4bcdf28f845904935c1b2e88e720e3ba342fd07f7f22ac05b8010932263e708ecdf6c516f901b690532a395e337494a69486
 SHA512 
5299df01fd06777bf85da12e4d4ec3b9eca866bbab6cac64f3d674b0b3ecc90dc4c28f5bc2c94064b7654d381aa873626e98ec9f26fc2b546380bb9e40077a85

diff --git a/net-analyzer/goaccess/files/goaccess.confd 
b/net-analyzer/goaccess/files/goaccess.confd
new file mode 100644
index 000000000000..4ff75a1a4ff6
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess.confd
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/goaccess
+
+# Various options.
+# run `goaccess --help` for valid cmdline options
+OPTS="--user-name=goaccess --pid-file=/run/goaccess/goaccess.pid -o 
/var/lib/goaccess/goaccess.html -l /var/log/goaccess/goaccess.log"
+
+# GoAccess config file
+#CONFIG="/etc/goaccess/goaccess.conf"

diff --git a/net-analyzer/goaccess/files/goaccess.initd 
b/net-analyzer/goaccess/files/goaccess.initd
new file mode 100644
index 000000000000..be0059588396
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/goaccess"
+name="GoAccess"
+description="Real-time web log analyzer"
+config="${CONFIG:-/etc/goaccess/goaccess.conf}"
+command_args="--real-time-html --daemonize -p $config ${OPTS}"
+start_stop_daemon_args="-q"
+
+depend() {
+       need net
+}

diff --git a/net-analyzer/goaccess/files/goaccess.service 
b/net-analyzer/goaccess/files/goaccess.service
new file mode 100644
index 000000000000..8fab5f9b7c56
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Real-time web log analyzer
+After=network.target
+
+[Service]
+Type=simple
+User=root
+Group=root
+Restart=always
+ExecStart=/usr/bin/goaccess --real-time-html --daemonize -p 
/etc/goaccess/goaccess.conf --user-name=goaccess -o 
/var/lib/goaccess/goaccess.html -l /var/log/goaccess/goaccess.log
+StandardOutput=null
+StandardError=null
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-analyzer/goaccess/files/goaccess.tmpfile 
b/net-analyzer/goaccess/files/goaccess.tmpfile
new file mode 100644
index 000000000000..caee9ffff853
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess.tmpfile
@@ -0,0 +1 @@
+d      /run/goaccess           0755    goaccess        goaccess

diff --git a/net-analyzer/goaccess/goaccess-1.6.2.ebuild 
b/net-analyzer/goaccess/goaccess-1.6.2.ebuild
new file mode 100644
index 000000000000..036459cecdb8
--- /dev/null
+++ b/net-analyzer/goaccess/goaccess-1.6.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools 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 ~amd64-linux"
+IUSE="debug geoip geoipv2 getline ssl unicode"
+REQUIRED_USE="geoipv2? ( geoip )"
+
+RDEPEND="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() {
+       econf \
+               "$(use_enable debug)" \
+               "$(use_enable geoip geoip "$(usex geoipv2 mmdb legacy)")" \
+               "$(use_enable unicode utf8)" \
+               "$(use_with getline)" \
+               "$(use_with ssl openssl)"
+}
+
+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() {
+       if ! has_version net-misc/geoipupdate ; then
+               einfo "You should consider to install net-misc/geoipupdate"
+               einfo "to be able to use GeoIP databases"
+       fi
+
+       tmpfiles_process goaccess.conf
+}

Reply via email to