# $Id: Portfile,v 1.1 2005/07/13 13:28:03 mww Exp $

PortSystem 1.0

name			mod_ssi_func
version			1.0
categories		www
platforms		darwin
maintainers		mww@opendarwin.org
description		advanced SSI modules for apache2
long_description	"${description}"

homepage		http://www.bbc.co.uk/opensource/projects/apache/
master_sites	${homepage}
distname		distribution_${version}
checksums		md5 6947621d7a31bff681967282b3ca9eac
use_zip			yes

depends_lib		port:apache2

pre-extract {
	file mkdir ${worksrcpath}
}
extract.dir		${worksrcpath}

patchfiles		patch-ssi_func-Makefile \
				patch-ssi_func_flastmod-Makefile \
				patch-ssi_func_math-Makefile \
				patch-ssi_func_rnd-Makefile \
				patch-ssi_setsplitvars-Makefile

use_configure	no

set mods		{ssi_func ssi_func_flastmod ssi_func_math ssi_func_rnd ssi_setsplitvars}

build {
	foreach mod ${mods} {
		system "cd ${worksrcpath}/${mod} && \
			make APXS=${prefix}/apache2/bin/apxs"
	}
}

destroot {
	foreach mod ${mods} {
		system "cd ${worksrcpath}/${mod} && \
			make install APXS=${prefix}/apache2/bin/apxs DESTDIR=${destroot}"
	}
}
