# $Id: Portfile 49564 2009-04-12 09:02:57Z jmr@macports.org $

PortSystem          1.0

name                drupal5
version             5.16
categories          www php
platforms           darwin

maintainers         acquia.com:chuck
description         Drupal Open Source enterprise content management platform
long_description    Drupal is Open Source social publishing software that empowers individuals, teams, and communities  \
                    to easily publish, manage and organize a wide variety of content on a website. Tens of thousands of \
                    people and organizations have used Drupal to power scores of different web sites, including community \
                    web portals, corporate web sites, social networking sites, personal web sites or blogs, and much more.
                    
homepage            http://drupal.org/
distname            drupal-${version}
master_sites        http://ftp.drupal.org/files/projects/ \
                    http://ftp.osuosl.org/pub/drupal/files/projects/
checksums           md5     b8b603a5dbf5e7f280ed6e1521ca9bae \
                    sha1    3dd95ece9570e5a889b9869a50608797b2976b19 \
                    rmd160  e79aa1fa15f5822dc32790d3f0f86ed4c9f6a8b0
depends_lib         port:apache2 \
                    port:php5 \
                    port:mysql5

variant apache1 description "use apache 1.x instead of apache 2.x" {
  depends_lib-append      port:apache
  depends_lib-delete      port:apache2
}

variant php4 description "use php4 instead of php5" {
  depends_lib-append      port:php4
  depends_lib-delete      port:php5
}

variant mysql4 description "use mysql4 instead of mysql5" {
  depends_lib-append      port:mysql4
  depends_lib-delete      port:mysql5
}

variant postgresql description "use postgresql as the drupal database" {
  depends_lib-append      port:postgresql83
  depends_lib-delete      port:mysql5
}

variant postgresql80 description "use postgres80 as the drupal database" {
  depends_lib-append      port:postgresql80
  depends_lib-delete      port:mysql5
}

variant postgresql81 description "use postgressql81 as the drupal database" {
  depends_lib-append      port:postgresql81
  depends_lib-delete      port:mysql5
}

variant postgresql82 description "use postgresql82 as the drupal database" {
  depends_lib-append      port:postgresql82
  depends_lib-delete      port:mysql5
}

variant postgresql83 description "use postgresql83 as the drupal database" {
  depends_lib-append      port:postgresql83
  depends_lib-delete      port:mysql5
}

use_configure       no
build               {}

set docroot ${destroot}/${prefix}/www/data

destroot {
  xinstall -d -m 0755 ${docroot}/drupal5
  eval file copy [glob ${worksrcpath}/*] ${docroot}/drupal5
  eval file copy ${worksrcpath}/.htaccess ${docroot}/drupal5
}
