SUMMARY="Terminal session recorder"
DESCRIPTION="asciinema lets you easily record terminal sessions and replay \
them in a terminal as well as in a web browser. It is the best companion of \
asciinema.org."
HOMEPAGE="https://asciinema.org/"
COPYRIGHT="2011-2018 Marcin Kulik"
LICENSE="GNU GPL v3"
REVISION="3"
SOURCE_URI="https://github.com/asciinema/asciinema/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="2578a1b5611e5375771ef6582a6533ef8d40cdbed1ba1c87786fd23af625ab68"
SOURCE_FILENAME="asciinema-$portVersion.tar.gz"

ARCHITECTURES="any"

USER_SETTINGS_FILES="
	settings/asciinema directory
	settings/asciinema/config
	"

PROVIDES="
	asciinema = $portVersion
	cmd:asciinema
	"
REQUIRES="
	haiku
	cmd:python3
	"
REPLACES="
	python3_asciinema
	"

BUILD_REQUIRES="
	haiku_devel
	setuptools_python3
	"
BUILD_PREREQUIRES="
	cmd:python3
	cmd:sed
	"

PATCH()
{
	sed -i "s|share/doc/asciinema|$relativeDocDir|
		s|share/man|$relativeManDir|" setup.py
}

BUILD()
{
	rm -rf build
	python3 setup.py build
}

INSTALL()
{
	python3 setup.py install --skip-build --prefix="$prefix" --root=/
}
