SUMMARY="A simple Tracker add-on that lets you search through text files."
DESCRIPTION="
Tracker Grep is a simple Tracker add-on that lets you search through text \
files. Haiku already comes with a tool that lets you do that, grep, but you \
need to use it from a Terminal window. Gone are those days of command-line \
trouble, because from now on Tracker Grep lets you run grep directly from the \
Tracker.
"
HOMEPAGE="https://github.com/HaikuArchives/TrackerGrep/"
SRC_URI="git://github.com/HaikuArchives/TrackerGrep.git#001a0b68be"
REVISION="2"
COPYRIGHT="
	1998-2006 Matthijs Hollemans
	2007 Jonas Sundström."
LICENSE="MIT"

ARCHITECTURES="x86_gcc2 x86 ?x86_64"

PROVIDES="
	TrackerGrep = $portVersion
	app:TrackerGrep = $portVersion
	"

REQUIRES="
	haiku >= $haikuVersion
	"

BUILD_REQUIRES="
	haiku_devel >= $haikuVersion
	"

BUILD_PREREQUIRES="
	cmd:gcc
	cmd:xres
	"

PATCHES="trackergrep-5.1.patchset"

BUILD()
{
	cd source
	g++ -o TrackerGrep GrepApp.cpp GrepWindow.cpp Model.cpp \
		TrackerGrep.cpp Grepper.cpp GrepListView.cpp -fpermissive \
		-lbe -ltracker -ltextencoding
	xres -o TrackerGrep TrackerGrep.rsrc
	mimeset -f TrackerGrep
}

INSTALL()
{
	cd source
	mkdir -p $addOnsDir/Tracker
	cp TrackerGrep $addOnsDir/Tracker
	addAppDeskbarSymlink $appsDir/TrackerGrep
}
