# $Id: Portfile 82825 2011-08-21 01:14:42Z jmr@macports.org $

PortSystem 1.0

name		midgard-core
version		8.09.9.2

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-9812767c7dd111dfa9c50b73943dabcaabca/

#use_bzip2	yes
checksums           md5     c23155900a6c15809018d18ddf6fd41d \
                    sha1    ac266b049a2224e7530e47590a28676834cce096 \
                    rmd160  e66b888956b19f0ce8ac07d75163082fa7decff7

depends_build	port:pkgconfig
depends_lib	port:expat \
    port:gettext \
    path:lib/pkgconfig/glib-2.0.pc:glib2 \
    port:dbus-glib \
    port:libiconv \
    port:libxml2 \
    path:bin/mysql_config5:mysql5 \
    port:openssl \
    port:zlib

configure.args	--sysconfdir=${prefix}/etc/midgard/ \
    --with-mysql-config=mysql_config5

variant check description {add unit tests} {
    depends_lib-append port:check
}

variant dbus description {compile with dbus support} {
    depends_lib-append port:dbus
    configure.args-append --with-dbus-support
}

post-install	{
    ui_msg "NB! The other parts of the package are:"
    ui_msg "midgard-apache2, php5-midgard and midgard-data"
}

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