# $Id: Portfile 68263 2010-05-30 12:54:45Z jwa@macports.org $

PortSystem 1.0

name		php5-midgard2
version		10.05.0

categories	php
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-431d0832594911dfbfe6a13fee8dd80bd80b/

#use_bzip2	yes
checksums           md5     de7a1ef809f619127d75d0633b3f7756 \
                    sha1    92b394c8b4fe317778586cfa294bcf1c1e790123 \
                    rmd160  ee32b6801711eb457b22a647470452cb6405abda

depends_lib	port:midgard2-core \
    path:bin/php:php5

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

configure.args	--sysconfdir=${prefix}/etc/midgard/ \
    --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 {download/[0-9-]+/">([0-9.]+)}
