SUMMARY="A tool to make and restore backups over a network"
DESCRIPTION="Burp aims to be a better Bacula and is a network backup and \
restore software. It relies on librsync for compression of network \
communication and of the backups itself. Burp provides both a client and a \
server and supports Windows's Volume Shadow Copy Services."
HOMEPAGE="https://burp.grke.org"
COPYRIGHT="
	2011-2014 Graham Keeling
	2005-2010 Troy D. Hanson
	"
LICENSE="GNU AGPL v3"
REVISION="4"
SOURCE_URI="https://burp.grke.org/downloads/burp-1.4.28/burp-1.4.28.tar.bz2"
CHECKSUM_SHA256="01c41c07805ebe8c882d7cb9f294e779b6decbe2eb2c81fd65d8fb2b174e18f0"
SOURCE_DIR="burp"
PATCHES="burp-1.4.28.patchset"

ARCHITECTURES="x86_gcc2 ?x86 ?ppc"

GLOBAL_WRITABLE_FILES="
	settings/burp/CA.cnf auto-merge
	settings/burp/autoupgrade/server/win32/script auto-merge
	settings/burp/autoupgrade/server/win64/script auto-merge
	settings/burp/burp-server.conf auto-merge
	settings/burp/burp.conf auto-merge
	settings/burp/clientconfdir/incexc/example auto-merge
	settings/burp/clientconfdir/testclient auto-merge
	settings/burp/notify_script auto-merge
	settings/burp/ssl_extra_checks_script auto-merge
	settings/burp/summary_script auto-merge
	settings/burp/timer_script auto-merge
	"

PROVIDES="
	burp = $portVersion
	cmd:bedup
	cmd:burp
	cmd:burp_ca
	cmd:vss_strip
	"
REQUIRES="
	haiku
	lib:libncurses
	lib:libpopt
	lib:librsync
	lib:libssl
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libncurses
	devel:libpopt
	devel:librsync
	devel:libssl
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:gawk
	cmd:gcc
	cmd:make
	cmd:sed
	"

BUILD()
{
	runConfigure  --omit-dirs sysconfdir\
		./configure --sysconfdir $settingsDir/burp
	make $jobArgs
}

escapedSharedStateDir=$(echo $sharedStateDir | sed -e 's/\//\\\//g')
INSTALL()
{
	sed -i "s/\$(DESTDIR)\/var\//$escapedSharedStateDir\//g" Makefile
	make install
}
