SUMMARY="A tool to truncate files of any kind"
DESCRIPTION="FileCropper is a GUI app which truncates files of any kind. It \
cuts off everything from a given offset (bytes) to the end of the file."
HOMEPAGE="https://github.com/HaikuArchives/FileCropper"
COPYRIGHT="2002 Maurice Michalski"
LICENSE="MIT"
REVISION="3"
srcGitRev="6660b2b1da50428aeebbb8c3b19ac4fd06adcf2c"
SOURCE_URI="https://github.com/HaikuArchives/FileCropper/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="24c2faddea0b9b48651c0ab55841b6cffe186c65f9157e77047b9a79b760ce0d"
SOURCE_FILENAME="filecropper-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="FileCropper-$srcGitRev"

ARCHITECTURES="all"

PROVIDES="
	filecropper = $portVersion
	app:FileCropper = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:g++
	cmd:xres
	"

BUILD()
{
	g++ app.cpp mainWindow.cpp -lbe -o FileCropper
	xres -o FileCropper FileCropper.rsrc
	mimeset -f FileCropper
}

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