# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name			phpicalendar
version			2.31
categories		www php
platforms		darwin
depends_run     port:php5-web
maintainers		nomaintainer
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.net/
master_sites	sourceforge
distname        ${name}${version}
extract.suffix	.tgz
checksums           md5     2aa665ec99a24711a71980e8cd0d96b6 \
                    sha1    8b1ce761fea2fcd8b1eb3ffc4c02cd3edcf40deb \
                    rmd160  5cf58988058cf2044cf746099d0d189d1958950e

extract.post_args	"| tar -xf - --exclude='*.DS_Store'"

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}/${name} ${destroot}${prefix}/www/
	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}
	}
}

livecheck.regex     ${name}(\\d+(?:\\.\\d+)*).tgz