SUMMARY="A simple program for running a quick terminal command"
DESCRIPTION="
Run Program, written by DarkWyrm, is a simple program that runs a command. It \
can autocomplete commands as you type, and is case insensitive.
If bound to a key combination via Shortcuts, commands can be run without even \
touching the mouse.
"
HOMEPAGE="https://github.com/HaikuArchives/RunProgram"
SOURCE_URI="git+git://github.com/HaikuArchives/RunProgram.git#a8fe29319e8dde884d8634a0c5a82838a3706563"
LICENSE="MIT"
COPYRIGHT="2008 DarkWyrm"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"

PROVIDES="
	runprogram = $portVersion
	app:RunProgram = $portVersion
	"

REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"

BUILD_PREREQUIRES="
	cmd:gcc
	cmd:xres
	"

BUILD()
{
	cd src
	rm -f ObjectList.h
	g++ -o RunProgram -lbe \
		AutoTextControl.cpp \
		ExeBox.cpp \
		main.cpp \
		RunWindow.cpp \
		TextFile.cpp
	xres -o RunProgram "Run Program.rsrc"
	mimeset -f RunProgram
}

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