# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 80323 2011-07-09 01:43:21Z ryandesign@macports.org $

PortSystem              1.0

name                    wordpress
version                 3.2
categories              www
platforms               darwin freebsd
maintainers             freebsd.org:miwi
supported_archs         noarch
worksrcdir              ${name}

description             A state-of-the-art semantic personal publishing platform

long_description        WordPress is a state-of-the-art semantic personal publishing platform \
                        with a focus on aesthetics, web standards, and usability.

homepage                http://wordpress.org/
master_sites            ${homepage}

checksums               sha1    ee2e7e0415e41d1ae0f82a1c1e5583a6ed257802 \
                        rmd160  517aa89ed46f011607ca056b8a54747bf53af5e2

depends_lib             port:php5-web \
                        port:php5-mysql \
                        port:php5-zip \
                        port:php5-gd

livecheck.type          regex
livecheck.url           ${homepage}
livecheck.regex         "Download&nbsp;WordPress&nbsp;(\\d+(?:\\.\\d+)*)"

use_configure           no
build                   {}

destroot {
    file copy ${worksrcpath} ${destroot}${prefix}/www/${name}
}

notes "
If your webserver is already running with php and mysql, connect on http://localhost/wordpress/ to finish the install.
Temporarily allow the webserver write access so it can create wp-config.php (or do it yourself)
$ sudo chmod 1777 ${prefix}/www/wordpress
$ sudo chmod 755 ${prefix}/www/wordpress

If Apache is not set, set an alias to the wordpress dir and some access like
-- ${prefix}/apache2/conf/extra/wordpress.conf
Alias /wordpress/ \"${prefix}/www/wordpress/\"
<Directory \"${prefix}/www/wordpress\">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
--
"
