# $Id: Portfile 66292 2010-04-08 17:43:39Z jwa@macports.org $

PortSystem 1.0

name		php5-midgard
version		8.09.8
categories	www
maintainers	jwa
description	A content management system
long_description Midgard is a content management system platform using \
    Apache, PHP and MySQL.
platforms	darwin
homepage	http://www.midgard-project.org/

master_sites	http://www.midgard-project.org/midcom-serveattachmentguid-30f5ca24377d11df9e47c3fb8587d4f2d4f2/

#use_bzip2	yes
checksums           md5     e5389acfb7576e47cd5e50d664084088 \
                    sha1    9e3a51a50af510e004274b17a298c1ea7e0f257a \
                    rmd160  9ba8211fe99ca0aa6c7f40d050de5ac6764d2e66

depends_lib	port:midgard-core \
    port:php52

pre-configure	{
    system "cd ${worksrcpath} && phpize"
}

configure.args	--sysconfdir=${prefix}/etc/midgard/ \
    --with-apxs=${prefix}/apache2/bin/apxs \
    --with-apr-config=${prefix}/bin/apr-1-config \
    --with-php-config=${prefix}/bin/php-config

destroot.destdir	INSTALL_ROOT=${destroot}

post-install {
    ui_msg "========================   IMPORTANT   ========================="
    ui_msg "If this is the first time you're installing Midgard, or you have"
    ui_msg "recently upgraded PHP, make sure to check your php.ini to verify"
    ui_msg "that extension_dir at least includes"
    system "php-config --extension-dir"
    ui_msg "================================================================"
}

livecheck.type	regex
livecheck.url	${homepage}download
livecheck.regex	${name}-(\[1-9\]+.\[0-9\]+.\[0-9\]+).tar.\[bg\]z
