SUMMARY="A utility for fast incremental file transfer"
DESCRIPTION="rsync is a file transfer program for Unix systems. rsync uses the \
'rsync algorithm' which provides a very fast method for bringing remote files \
into sync. It does this by sending just the differences in the files across \
the link, without requiring that both sets of files are present at one of the \
ends of the link beforehand."
HOMEPAGE="https://rsync.samba.org/"
COPYRIGHT="1996-2013 by Andrew Tridgell, Wayne Davison, and others"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="http://rsync.samba.org/ftp/rsync/src/rsync-$portVersion.tar.gz"
CHECKSUM_SHA256="55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
PATCHES="rsync-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	rsync = $portVersion compat >= 3
	cmd:rsync = $portVersion compat >= 3
	"
REQUIRES="
	haiku
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:find
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	aclocal
	autoconf
	runConfigure ./configure \
		--enable-xattr-support \
		--disable-iconv \
		--disable-iconv-open \
		--disable-locale \
		--disable-debug \
		--with-included-zlib=no

	make reconfigure
	make
}

INSTALL()
{
	make install
}

TEST()
{
	make test
}
