# $Id: Portfile 30257 2007-10-23 02:28:30Z jmpp@macports.org $
PortSystem		1.0

name			moodle
version			1.5.3
categories		www
maintainers		nomaintainer
description		Course management system based on social constructionism
long_description	Moodle is a course management system (CMS) - a free, Open Source software \
			package designed using sound pedagogical principles, to help educators \
			create effective online learning communities. You can use it on any \
			computer you have handy (including webhosts), yet it can scale from a \
			single-teacher site to a 40,000-student University. \
homepage		http://moodle.org
set branch		15
master_sites		http://download.moodle.org/stable${branch}
distname		moodle-${version}
extract.suffix		.tgz
checksums		md5 52dd50298fc1dd8b1b6d8d499608cdd6
platforms		darwin freebsd

use_configure		no
build			{}

depends_lib		port:apache2 port:php5 port:mysql5

variant apache {
	depends_lib-append	port:apache
	depends_lib-delete	port:apache2
}

variant php4 {
	depends_lib-append 	port:php4
	depends_lib-delete	port:php5
}

variant mysql3 conflicts mysql4 {
	depends_lib-append	port:mysql3
	depends_lib-delete	port:mysql5
}

variant mysql4 conflicts mysql3 {
	depends_lib-append	port:mysql4
	depends_lib-delete	port:mysql5
}

set docpath ${destroot}${prefix}/www/data
             
destroot {
	xinstall -d -m 0755 ${docpath}/moodle
	eval file copy [glob ${workpath}/moodle/*] ${docpath}/moodle
}


