public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/goaccess/
Date: Tue, 27 Sep 2022 12:12:33 +0000 (UTC)	[thread overview]
Message-ID: <1664280751.506ad4e3129523f420fea355eb8eb5665f7daa76.juippis@gentoo> (raw)

commit:     506ad4e3129523f420fea355eb8eb5665f7daa76
Author:     Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua>
AuthorDate: Thu Sep  1 19:48:33 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 12:12:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=506ad4e3

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 <AT> spiderx.dp.ua>
Closes: https://github.com/gentoo/gentoo/pull/27109
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/goaccess/goaccess-9999.ebuild | 69 +++++++++++++++++++-----------
 1 file changed, 45 insertions(+), 24 deletions(-)

diff --git a/net-analyzer/goaccess/goaccess-9999.ebuild b/net-analyzer/goaccess/goaccess-9999.ebuild
index 4f3beee63c9e..084f44d4032a 100644
--- a/net-analyzer/goaccess/goaccess-9999.ebuild
+++ b/net-analyzer/goaccess/goaccess-9999.ebuild
@@ -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
 }


             reply	other threads:[~2022-09-27 12:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 12:12 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-18  7:41 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/goaccess/ Joonas Niilola
2024-07-18  7:41 Joonas Niilola
2024-07-18  7:41 Joonas Niilola
2023-12-04  3:00 Yixun Lan
2023-07-14  6:50 Joonas Niilola
2023-07-14  6:50 Joonas Niilola
2023-02-16  4:18 Sam James
2022-09-27 12:12 Joonas Niilola
2022-09-27 12:12 Joonas Niilola
2022-08-17 16:43 Joonas Niilola
2021-07-17 21:30 David Seifert
2021-04-30 18:46 Mikle Kolyada
2021-01-02 21:55 David Seifert
2021-01-02 21:43 David Seifert
2020-11-20 12:07 Joonas Niilola
2020-11-20 12:07 Joonas Niilola
2020-11-20 12:07 Joonas Niilola
2020-11-20 12:07 Joonas Niilola
2018-12-04 22:53 Patrice Clement
2017-11-05 15:37 Patrice Clement
2017-01-16 18:08 David Seifert
2017-01-16 18:08 David Seifert

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=1664280751.506ad4e3129523f420fea355eb8eb5665f7daa76.juippis@gentoo \
    --to=juippis@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