Receipt for: goaccess

source
# SliTaz package receipt.

PACKAGE="goaccess"
VERSION="1.9.3"
CATEGORY="network"
SHORT_DESC="Visual web log analyzer."
MAINTAINER="paul@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://goaccess.io"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://tar.goaccess.io/$TARBALL"

DEPENDS="geoip ncurses"
BUILD_DEPENDS="geoip-dev glib-dev ncurses-dev ncursesw-dev pkg-config"

# What is the latest version available today?
current_version()
{
	wget -O - https://goaccess.io/download 2>/dev/null | \
	sed '/goaccess-[0-9]/!d;s|.*goaccess-||;s|.tar.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	# goaccess uses unconditional 64-bit __sync atomics: no cmpxchg8b on
	# i486 and gcc's libatomic ships no __sync_*_8 entry points either.
	# Require a Pentium for this package (cmpxchg8b inline, 1993+) — a web
	# log analyzer will not run on a real 486 anyway.
	case "$ARCH" in
		i?86) CFLAGS="$(echo "$CFLAGS" | sed 's/-march=i.86/-march=i586/')" ;;
	esac

	./configure			\
		--prefix=/usr		\
		--enable-geoip=legacy	\
		--enable-utf8 &&

	# 1.5.5 not needed
	# hack for curses.h path
#	mkdir /usr/include/ncursesw && ln -s /usr/include/curses.h /usr/include/ncursesw/curses.h

	make &&
	make install DESTDIR=$DESTDIR

	# and remove hack
#	rm -rf /usr/include/ncursesw
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cook_copy_folders	bin
}