# $Id: Portfile 40601 2008-10-08 07:18:04Z jmr@macports.org $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		{ifconfig ruby-ifconfig} 1.2 setup.rb \
				{README TODO ChangeLog test}
maintainers		nomaintainer
description		Ruby wrapper around the ifconfig command on many platforms
long_description	This is a Ruby wrapper around the ifconfig command. \
					The goal is to make getting any information that \
					ifconfig provides easy to access. 
categories-append	sysutils
homepage		http://www.packetspike.net/~daniel/ruby/ifconfig/
master_sites	${homepage}
checksums		md5 bef9810b76f6b1d53ed42a22a7a66320 \
				sha1 dbcbcddc86fc02cdd3b642be31b5020a2f4f2f88
platforms		darwin

post-patch {
	foreach file [glob ${worksrcpath}/test/*.rb ${worksrcpath}/test/ts_run] {
		reinplace "s|^#!.*ruby|#!${ruby.bin}|" $file
	}
}

test.run		yes
test.dir		${worksrcpath}/test
test.cmd		${ruby.bin}
test.target		./ts_run

