# $Id: Portfile 66273 2010-04-08 06:28:47Z ryandesign@macports.org $

PortSystem	1.0
PortGroup xcode 1.0

name		istumbler
version		98
categories	aqua
maintainers	nomaintainer
description	iStumbler is an Aqua GUI for finding wireless networks
long_description	iStumbler is a free, open source tool for finding \
		802.11b & 802.11g  wireless networks. iStumbler \
		combines a compact Aqua user interface  with visual \
		feedback of signal strength and encryption. \
		Use the +use_binary (default) variant as building from source \
		remains problematic.
homepage	http://www.istumbler.net/
master_sites	\
	http://www.istumbler.net/downloads/ \
	http://www.istumbler.net/archive/release${version}/downloads/

distname	${name}-${version}-src
extract.suffix	.tgz

checksums \
	md5 5a16cc30d8e211254ab4d8c0777b8cfc \
	sha1 d09c368fbd6002595205a4c09d2c72da4f53795c \
	rmd160 c8a3b25c2d558f19a5506e5298c448f7ffad365f

worksrcdir	iStumbler

xcode.target	iStumbler
xcode.configuration	Release
xcode.build.settings	\
	OTHER_CFLAGS="-I${worksrcpath}/Frameworks" \
 	OTHER_CFLAGS="-I${worksrcpath}/build" \
	SYMROOT=${worksrcpath}/build
#	FRAMEWORK_SEARCH_PATHS=${worksrcpath}/build
#	BUILT_PRODUCTS_DIR=${worksrcpath}/build
#	OTHER_LDFLAGS="-I${worksrcpath}/Frameworks" \

if { ![variant_isset use_source] } {
	default_variants +use_binary
}

variant use_binary conflicts use_source description {Install from binary distribution} {
	distname ${name}-${version}
	checksums \
		md5 89981ff4ae5dc087b867ae2ff295898a \
		sha1 2e8912aed8a32353c76d147c1f37493abe0abb9a \
		rmd160 ded5f623f3d9d5fe63008b5b58358b2b73eb55f0
	patch {}
	use_configure	no
	build {}
	destroot {
		xinstall -d ${destroot}${applications_dir}
		file copy ${workpath}/iStumbler.app ${destroot}${applications_dir}
	}
}

variant use_source conflicts use_binary description {Build from source (does not work)} {}

default_variants +universal
variant universal {}
pre-fetch {
	if {![variant_isset universal]} {
		return -code error "${name} is only available in a universal version"
	}
}

livecheck.type	regex
livecheck.regex	{iStumbler Release (\d+)}
