diff --git a/sysutils/goaccess/Makefile b/sysutils/goaccess/Makefile index 0bf7a4c6ac32..30e34d496d0a 100644 --- a/sysutils/goaccess/Makefile +++ b/sysutils/goaccess/Makefile @@ -1,59 +1,49 @@ 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 LICENSE_FILE= ${WRKSRC}/COPYING USES= alias compiler:c11 pkgconfig ncurses 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 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 @@ -1,43 +1,40 @@ #!/bin/sh # PROVIDE: goaccess # 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 name=goaccess rcvar=goaccess_enable 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,16 +1,16 @@ 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 %%NLS%%share/locale/fr/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/it/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/ja/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/ko/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/pt_BR/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/ru/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/sv/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/uk/LC_MESSAGES/goaccess.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/goaccess.mo