# Template file for 'ttyrec'
pkgname=ttyrec
version=1.0.8
revision=6
short_desc="Record and playback activity on a tty"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-4-Clause-UC"
homepage="http://0xcc.net/ttyrec"
distfiles="http://0xcc.net/ttyrec/${pkgname}-${version}.tar.gz"
checksum=ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec

do_build() {
	sed -i 's/\$(CFLAGS)/$(LDFLAGS)/' Makefile
	make ${makejobs} CC=$CC CFLAGS="-DHAVE_openpty $CFLAGS" LDFLAGS="-lutil $LDFLAGS"
}
do_install() {
	for f in rec play time; do
		vbin tty${f}
		vman tty${f}.1
	done
	sed -n '1,32p' ttyrec.c > LICENSE
	vlicense LICENSE
}
