SUMMARY="Communication package providing the XMODEM, YMODEM & ZMODEM protocols"
DESCRIPTION="lrzsz is a Unix package providing the XMODEM, YMODEM AND ZMODEM \
file transfer protocols."
HOMEPAGE="https://ohse.de/uwe/software/lrzsz.html"
COPYRIGHT="1996-1998 Uwe Ohse"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="https://ohse.de/uwe/releases/lrzsz-$portVersion.tar.gz"
CHECKSUM_SHA256="c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1"

ARCHITECTURES="all"

PROVIDES="
	lrzsz = $portVersion
	cmd:lrb = $portVersion
	cmd:lrx = $portVersion
	cmd:lrz = $portVersion
	cmd:lsb = $portVersion
	cmd:lsx = $portVersion
	cmd:lsz = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:sed
	"

PATCH()
{
	sed -i -e "s|ln|ln -r -s|" src/Makefile.in
}

BUILD()
{
	runConfigure --omit-dirs "docDir dataRootDir" ./configure
	make $jobArgs LIBS="-lnetwork"
}

INSTALL()
{
	make install
	mkdir -p $dataDir
	mv $prefix/share/* $dataDir
	rmdir $prefix/share
}

TEST()
{
	make check
}
