# $Id: Portfile,v 1.2 2004/08/11 22:08:28 rshaw Exp $

PortSystem 1.0

name			daemontools
version			0.76
revision		1
categories		sysutils
platforms		darwin
maintainers		mww@opendarwin.org
description		collection of tools for managing UNIX services
long_description	daemontools is an extensive collection of tools for \
					managing UNIX services. It includes tools for starting, \
					restarting, stopping, monitoring and logging any services \
					that you might wish to run.

homepage		http://cr.yp.to/daemontools.html
master_sites	http://cr.yp.to/daemontools/ \
				http://smarden.org/pape/djb/manpages/:man
distfiles-append	${distname}-man.tar.gz:man
checksums		${distname}.tar.gz md5 1871af2453d6e464034968a0fbcb2bfc \
				${distname}-man.tar.gz md5 2d3858a48f293c87202f76cd883438ee

worksrcdir		admin/${worksrcdir}

use_configure	no

build.cmd		package/compile
build.target

post-build	{
	system "cd ${workpath}/daemontools-man && gzip *.8"
}

destroot	{
	xinstall -m 755 -s -W ${worksrcpath}/command envdir envuidgid fghack \
		multilog pgrphack readproctitle setlock setuidgid softlimit supervise \
		svc svok svscan svstat tai64n tai64nlocal \
		${destroot}${prefix}/sbin
	xinstall -m 755 -W ${worksrcpath}/command svscanboot \
		${destroot}${prefix}/sbin
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/src CHANGES TODO \
		${destroot}${prefix}/share/doc/${name}

	xinstall -m 755 -d ${destroot}${prefix}/share/man/man8
	xinstall -m 644 -W ${workpath}/daemontools-man envdir.8.gz envuidgid.8.gz \
		fghack.8.gz multilog.8.gz pgrphack.8.gz readproctitle.8.gz \
		setlock.8.gz setuidgid.8.gz softlimit.8.gz supervise.8.gz svc.8.gz \
		svok.8.gz svscan.8.gz svscanboot.8.gz svstat.8.gz tai64n.8.gz \
		tai64nlocal.8.gz ${destroot}${prefix}/share/man/man8
	xinstall -m 644 ${workpath}/daemontools-man/README \
		${destroot}${prefix}/share/doc/${name}/README_MANPAGES
}
