From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 654FC158095 for ; Tue, 27 Sep 2022 12:12:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70A92E0C97; Tue, 27 Sep 2022 12:12:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 56AF6E0C97 for ; Tue, 27 Sep 2022 12:12:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 762703412E1 for ; Tue, 27 Sep 2022 12:12:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BEDC75EC for ; Tue, 27 Sep 2022 12:12:33 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1664280751.506ad4e3129523f420fea355eb8eb5665f7daa76.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/goaccess/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/goaccess/goaccess-9999.ebuild X-VCS-Directories: net-analyzer/goaccess/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 506ad4e3129523f420fea355eb8eb5665f7daa76 X-VCS-Branch: master Date: Tue, 27 Sep 2022 12:12:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ed2e0b11-5759-4de9-83ed-a5b165210405 X-Archives-Hash: 215176463d16b7ce6cf56a70e0c43f25 commit: 506ad4e3129523f420fea355eb8eb5665f7daa76 Author: Vladimir Pavljuchenkov (SpiderX) spiderx dp ua> AuthorDate: Thu Sep 1 19:48:33 2022 +0000 Commit: Joonas Niilola gentoo 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.dp.ua> Closes: https://github.com/gentoo/gentoo/pull/27109 Signed-off-by: Joonas Niilola 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 }