# $Id: Portfile,v 1.6 2005/11/05 13:49:10 mww Exp $
PortSystem 1.0

name			ihook
version			1.0.3
categories		aqua
maintainers		darwinports@opendarwin.org
description		A graphical interface frontend for commandline executables
long_description	iHook is a graphical frontend for any commandline \
					executable. It gives scripts a pleasant Aqua face, \
					and allows script writers to provide graphical \
					feedback without having to learn one of the higher \
					APIs available for Mac OS X. 
homepage		http://rsug.itd.umich.edu/software/ihook/
master_sites	${homepage}/files/
checksums		md5 22e7bcc0ff6c592a7a28001adf81aca1
platforms		darwin

use_configure	no
set appName		iHook

pre-build {
	cd ${worksrcpath}
	system "cc -framework Security -o shookexec selfrepair.c shookexec.c"
}
build.type		pbx
build.target	-buildstyle Deployment -target ${appName}

set xcodebuilddir	build
platform darwin 8 {
	if {$xcodeversion == "2.1"} {
		set xcodebuilddir	build/Deployment
	}
}

destroot {
	cd ${worksrcpath}
	set appPath ${destroot}/Applications/DarwinPorts
	xinstall -d -m 0755 ${appPath}
	system "cp -R ${xcodebuilddir}/${appName}.app ${appPath}/${appName}.app"
	set docPath ${destroot}${prefix}/share/doc/${name}
	xinstall -d -m 0755 ${docPath}
	xinstall -m 0644 "${appName} Lexicon.rtf" ${docPath}
	xinstall -m 0644 "${appName} README.rtf" ${docPath}
}

