# $Id: Portfile,v 1.8 2005/07/10 15:46:11 mww Exp $

PortSystem 1.0

name		wakeonlan
version		0.41
categories	net
maintainers	mww@opendarwin.org
platforms	darwin freebsd
description	wakeonlan sends magic packets for network-devices to wake up
long_description	Wakeonlan is a Perl script that sends 'magic packets' \
			to wake-on-LAN enabled ethernet adapters and \
			motherboards, in order to switch on remote computers. 

homepage	http://gsd.di.uminho.pt/jpo/software/wakeonlan/
master_sites	${homepage}downloads/
checksums	md5 d3143c5fe92d16196ac853b55dd421b5

depends_build   bin:perl:perl5.8
depends_run	bin:perl:perl5.8

patch {
	reinplace "s|/usr/bin/perl -w|/usr/bin/env perl|g" ${worksrcpath}/wakeonlan
}

configure {
	system "cd ${worksrcpath} && perl Makefile.PL"
}

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/blib/man1/wakeonlan.1 \
		${destroot}${prefix}/share/man/man1/
	xinstall -m 755 ${worksrcpath}/blib/script/wakeonlan \
		${destroot}${prefix}/bin/
	xinstall -m 644 -W ${worksrcpath} Changes MANIFEST README \
		examples/lab001.wol ${destroot}${prefix}/share/doc/${name}
}
