git: 7cd917cb9f86 - main - sysutils/goaccess: Multiple cleanups
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Nov 2022 15:14:57 UTC
The branch main has been updated by adamw:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7cd917cb9f86bd2d715ad0277881525d5cc7369a
commit 7cd917cb9f86bd2d715ad0277881525d5cc7369a
Author: Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2022-11-05 15:02:08 +0000
Commit: Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-11-05 15:14:50 +0000
sysutils/goaccess: Multiple cleanups
* Use https MASTER_SITES
* Update COMMENT and pkg-descr to note that this does much more than
Apache logs
* Remove tokyocabinet options; support was removed upstream 2.5 years
ago
* Remove DEBUG option
* Make UTF8 support mandatory
* Don't install license twice
* Use option helpers
* Update strings in rc(8) file and fix hardcoded paths
---
sysutils/goaccess/Makefile | 42 ++++++++++++++-----------------------
sysutils/goaccess/files/goaccess.in | 29 ++++++++++++-------------
sysutils/goaccess/pkg-descr | 13 +++++++++---
sysutils/goaccess/pkg-plist | 2 +-
4 files changed, 40 insertions(+), 46 deletions(-)
diff --git a/sysutils/goaccess/Makefile b/sysutils/goaccess/Makefile
index 0bf7a4c6ac32..30e34d496d0a 100644
--- a/sysutils/goaccess/Makefile
+++ b/sysutils/goaccess/Makefile
@@ -1,10 +1,11 @@
PORTNAME= goaccess
PORTVERSION= 1.6.5
+PORTREVISION= 1
CATEGORIES= sysutils
-MASTER_SITES= http://tar.goaccess.io/
+MASTER_SITES= https://tar.goaccess.io/
MAINTAINER= adamw@FreeBSD.org
-COMMENT= Real-time Apache web log analyzer
+COMMENT= Real-time web log analyzer
WWW= https://goaccess.io
LICENSE= MIT
@@ -15,45 +16,34 @@ USE_RC_SUBR= goaccess
INSTALL_TARGET= install-strip
GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --enable-utf8
CFLAGS+= -I${NCURSESINC} -I${LOCALBASE}/include
LDFLAGS+= -L${NCURSESLIB} -L${LOCALBASE}/lib
-PORTDOCS= AUTHORS COPYING ChangeLog NEWS README TODO
+PORTDOCS= AUTHORS ChangeLog NEWS README TODO
-OPTIONS_DEFINE= DOCS DEBUG GEOIP2 NLS SSL UTF8
-OPTIONS_DEFAULT= GEOIP2 SSL UTF8
-OPTIONS_RADIO= TOKYOCABINET
-OPTIONS_RADIO_TOKYOCABINET= TOKYOCABINET_BTREE TOKYOCABINET_MHASH
+OPTIONS_DEFINE= DOCS GEOIP2 NLS SSL
+OPTIONS_DEFAULT=GEOIP2 SSL
OPTIONS_SUB= yes
-DEBUG_CONFIGURE_ON= --enable-debug
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext-runtime
-UTF8_CONFIGURE_ON= --enable-utf8
GEOIP2_DESC= IP location support
-GEOIP2_CONFIGURE_ON= --enable-geoip=mmdb
+GEOIP2_CONFIGURE_ENABLE=geoip=mmdb
GEOIP2_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb
SSL_DESC= Use SSL for WebSocket
-SSL_CONFIGURE_ON= --with-openssl
-SSL_USES= ssl
-
-TOKYOCABINET_DESC= Tokyo Cabinet support
-TOKYOCABINET_BTREE_DESC= Storage using on-disk B+ Tree
-TOKYOCABINET_MHASH_DESC= Storage using on-memory hash database
-TOKYOCABINET_BTREE_CONFIGURE_ON= --enable-tcb=btree
-TOKYOCABINET_MHASH_CONFIGURE_ON= --enable-tcb=memhash
-TOKYOCABINET_BTREE_LIB_DEPENDS= libtokyocabinet.so:databases/tokyocabinet
-TOKYOCABINET_MHASH_LIB_DEPENDS= libtokyocabinet.so:databases/tokyocabinet
-
-do-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+SSL_CONFIGURE_WITH= openssl
+SSL_USES= ssl
post-install:
- ${MV} ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf \
- ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
+ ${MV} ${STAGEDIR}${ETCDIR}/goaccess.conf \
+ ${STAGEDIR}${ETCDIR}/goaccess.conf.sample
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/sysutils/goaccess/files/goaccess.in b/sysutils/goaccess/files/goaccess.in
index b45e12c759ef..b8ef6987b1db 100644
--- a/sysutils/goaccess/files/goaccess.in
+++ b/sysutils/goaccess/files/goaccess.in
@@ -4,14 +4,13 @@
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
-# Add the following lines to /etc/rc.conf to enable goaccess.
+# To enable the goaccess daemon, add `goaccess_enable="YES"`' to
+# your /etc/rc.conf or /etc/rc.conf.local
#
-# goaccess_html (path): Set to /var/run/goaccess/goaccess.html
-# by default.
-# goaccess_log (path): Set to /var/log/httpd-access.log
-# by default.
-# goaccess_config (str): Set to %%PREFIX%%/etc/goaccess.conf
-# by default. Only used if the file exists.
+# Optional settings:
+# goaccess_html (path): Output file (/var/run/goaccess/goaccess.html)
+# goaccess_log (path): Input log (/var/log/httpd-access.log)
+# goaccess_config (path): Default: %%ETCDIR%%/goaccess.conf
. /etc/rc.subr
@@ -22,22 +21,20 @@ load_rc_config $name
: ${goaccess_html:=/var/run/goaccess/goaccess.html}
: ${goaccess_log:=/var/log/httpd-access.log}
-: ${goaccess_config:=%%PREFIX%%/etc/goaccess/goaccess.conf}
+: ${goaccess_config:=%%ETCDIR%%/goaccess.conf}
-command=/usr/local/bin/${name}
+command=%%PREFIX%%/bin/${name}
pidfile=/var/run/${name}.pid
-# This is done to allow Directory be used for when configuring Apache
-# as Files does not allow for a full path.
start_precmd=start_precmd
start_precmd()
{
- if [ $goaccess_html = /var/run/goaccess/goaccess.html ]; then
- if [ ! -d /var/run/goaccess ]; then
- mkdir /var/run/goaccess
- fi
+ htmldir=$(dirname "$goaccess_html")
+ if ! [ -d "$htmldir" ]; then
+ echo "Creating HTML output dir $htmldir."
+ mkdir "$htmldir"
fi
}
-command_args="--daemonize --real-time-html --pid-file=$pidfile -p $goaccess_config -o $goaccess_html"
+command_args="--daemonize --real-time-html --pid-file='$pidfile' -p '$goaccess_config' -o '$goaccess_html'"
run_rc_command "$1"
diff --git a/sysutils/goaccess/pkg-descr b/sysutils/goaccess/pkg-descr
index b3e6abc5bac9..811caeaf779b 100644
--- a/sysutils/goaccess/pkg-descr
+++ b/sysutils/goaccess/pkg-descr
@@ -1,3 +1,10 @@
-GoAccess is an open source real-time Apache web log analyzer and interactive
-viewer that runs in a terminal and provides fast and valuable HTTP statistics
-for system administrators that require a visual report on the fly.
+ GoAccess is an open source real-time web log analyzer and interactive
+ viewer that runs in a terminal or through your browser.
+
+ It can parse a variety of web log formats, including common and
+ combined log formats, caddy JSON, and many more. Because it is a log
+ parser, it does not inject anything into your website and does not
+ require any scripts or weird 1-pixel images.
+
+ GoAccess outputs HTML full of analytics, or runs interactively in
+ console, continually updated via websockets.
diff --git a/sysutils/goaccess/pkg-plist b/sysutils/goaccess/pkg-plist
index 87103486122a..82574eef011a 100644
--- a/sysutils/goaccess/pkg-plist
+++ b/sysutils/goaccess/pkg-plist
@@ -1,7 +1,7 @@
bin/goaccess
%%ETCDIR%%/browsers.list
%%ETCDIR%%/podcast.list
-@sample %%ETCDIR%%/goaccess.conf.sample etc/goaccess.conf
+@sample %%ETCDIR%%/goaccess.conf.sample
man/man1/goaccess.1.gz
%%NLS%%share/locale/de/LC_MESSAGES/goaccess.mo
%%NLS%%share/locale/es/LC_MESSAGES/goaccess.mo