# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=goaccess
pkgver=1.9.3
pkgrel=0
pkgdesc="Real-time web log analyzer and interactive viewer"
options="!check" # no test suite
url="https://goaccess.io/"
arch="all"
license="MIT"
makedepends="ncurses-dev geoip-dev glib-dev libmaxminddb-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://tar.goaccess.io/goaccess-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-geoip=mmdb \
		--enable-utf8
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dvm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}

sha512sums="
6f838d006bec65819d42115b9ce6edb3d839c1bbb609353163960361684ae67c5ecb859e5c9e19eb3233aac4e97c18bdd4d19e1919b05695b3dfef3ca5e7a192  goaccess-1.9.3.tar.gz
"
