# $Id: Portfile,v 1.4 2006/02/17 08:56:13 mww Exp $

PortSystem 1.0

name		uptimed
version		0.3.7
categories	sysutils
platforms	darwin
maintainers	mww@opendarwin.org
description	uptime record daemon
long_description	uptimed is an uptime record daemon keeping track of \
			the highest uptimes a computer system ever had.

homepage	http://podgorny.cz/moin/Uptimed
master_sites	http://podgorny.cz/uptimed/releases/
checksums	sha1 5b420550e471244914eec26e0f4cb8bd540ebc76
use_bzip2	yes
patchfiles	patch-Makefile.am

configure.args	--mandir=${prefix}/share/man
post-configure	{
	reinplace "s|/var/spool/uptimed|${prefix}/var/spool/uptimed|g" \
		${worksrcpath}/libuptimed/urec.h
	reinplace "s|/var/run/uptimed|${prefix}/var/run/uptimed|g" \
		${worksrcpath}/etc/uptimed.conf-dist
}

destroot.args	INSTALL=/usr/bin/install
post-destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/var/spool/uptimed
	system "touch ${destroot}${prefix}/var/spool/uptimed/bootid"
}

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
