# $Id: Portfile,v 1.2 2005/10/10 09:06:22 mww Exp $

PortSystem 1.0

name			phpicalendar
version			2.0.1
revision		1
categories		www php
platforms		darwin
maintainers		mww@opendarwin.org
description		web-based iCal viewer
long_description	PHP iCalendar is a PHP-based iCal file viewer/parser to display \
				iCals in a Web browser.

homepage		http://phpicalendar.sourceforge.net/
master_sites	sourceforge
extract.suffix	.tgz
checksums		md5 a73847a15634f8caf2ce96c341e23b56
patchfiles		patch-templates-default-sidebar.tpl

use_configure	no

build	{}

set conf		${prefix}/www/${name}/config.inc.php

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/www \
		${destroot}${prefix}/share/doc/${name}
	file copy ${worksrcpath} ${destroot}${prefix}/www/${name}
	foreach f { AUTHORS COPYING README TIMEZONES } {
		file rename ${destroot}${prefix}/www/${name}/${f} \
			${destroot}${prefix}/share/doc/${name}/${f}
	}
	file rename ${destroot}${conf} ${destroot}${conf}.sample
}

post-activate {
	if ![file exists ${conf}] {
		xinstall -m 644 ${conf}.sample ${conf}
	}
}

