SUMMARY="Safely delete files"
DESCRIPTION="Shredder is a plugin for tracker, which allows to safely delete \
files by overwriting them multiple times."
HOMEPAGE="https://github.com/HaikuArchives/Shredder"
COPYRIGHT="2009 Jason Grenier"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://github.com/HaikuArchives/Shredder/archive/c6311845fee6e51b347a9eff2c79fbf9548316a6.tar.gz"
CHECKSUM_SHA256="9d2aaaf51e7a6a75b599e230b320308cfc3420a306be60bd36bf708eef373e41"
SOURCE_DIR="Shredder-c6311845fee6e51b347a9eff2c79fbf9548316a6"

ARCHITECTURES="all"

PROVIDES="
	shredder = $portVersion
	app:Shredder = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	"

BUILD()
{
	cd src/Shredder
	make $jobArgs OBJ_DIR=objects

	cd ../Shredder-S
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	mkdir -p $appsDir
	cd src/Shredder
	cp objects/Shredder $appsDir/Shredder
	addPreferencesDeskbarSymlink $appsDir/Shredder

	mkdir -p $addOnsDir/Tracker
	cd ../Shredder-S
	cp objects/Shredder-S $addOnsDir/Tracker
}
