SUMMARY="A replacement for files copy dialogs"
DESCRIPTION="Ultracopier is free and open source software licensed under \
GPL3 that acts as a replacement for files copy dialogs."
HOMEPAGE="https://ultracopier.first-world.info/"
COPYRIGHT="2012-2019 BRULE Herman Jacques Roger (alpha_one_x86)"
LICENSE="GNU GPL v3"
REVISION="1"
srcGitRev="a59a486b8b67f8f26c4849e9fbe74fd1e8fe6b90"
SOURCE_URI="https://github.com/alphaonex86/Ultracopier/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="780bac14291c6bc69ead080643fe5773bb9dece6bc551d3715bb29f859cd09bc"
SOURCE_FILENAME="ultracopier-$portVersion.tar.gz"
SOURCE_DIR="Ultracopier-$srcGitRev"

ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	ultracopier$secondaryArchSuffix = $portVersion
	app:UltraCopier$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libQt5Network$secondaryArchSuffix
	lib:libQt5Widgets$secondaryArchSuffix
	lib:libQt5Xml$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libGL$secondaryArchSuffix
	devel:libQt5Core$secondaryArchSuffix
	devel:libQt5Gui$secondaryArchSuffix
	devel:libQt5Network$secondaryArchSuffix
	devel:libQt5Widgets$secondaryArchSuffix
	devel:libQt5Xml$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:find
	cmd:gcc$secondaryArchSuffix
	cmd:lrelease$secondaryArchSuffix >= 5
	cmd:make
	cmd:qmake$secondaryArchSuffix >= 5
	"

BUILD()
{
	find ./ -name '*.ts' -exec lrelease {} \;
	qmake ultracopier.pro
	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir
	cp ultracopier $appsDir/UltraCopier
	addAppDeskbarSymlink $appsDir/UltraCopier
}
