# $Id: Portfile 85359 2011-10-13 02:12:43Z jmr@macports.org $

PortSystem          1.0

name                drupal5
version             5.23
categories          www php
platforms           darwin
maintainers         acm.org:c_dantonio

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     562f3dde93657130d14405b99ac6a672 \
                    sha1    9b70b5822a34d6ec9b97214675b1443c265ef481 \
                    rmd160  3ef5e809d522efc7c91c2cfae564c3e6af3525b4
depends_lib         port:apache2 \
                    port:php52 \
                    path:bin/mysql_config5: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:php52
}

variant mysql4 conflicts postgresql postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 description "use mysql4 instead of mysql5" {
  depends_lib-append      port:mysql4
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql conflicts mysql4 description "use postgresql as the drupal database" {
  depends_lib-append      port:postgresql84
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql80 conflicts mysql4 postgresql81 postgresql82 postgresql83 postgresql84 description "use postgres80 as the drupal database" {
  depends_lib-append      port:postgresql80
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql81 conflicts mysql4 postgresql80 postgresql82 postgresql83 postgresql84 description "use postgressql81 as the drupal database" {
  depends_lib-append      port:postgresql81
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql82 conflicts mysql4 postgresql80 postgresql81 postgresql83 postgresql84  description "use postgresql82 as the drupal database" {
  depends_lib-append      port:postgresql82
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql83 conflicts mysql4 postgresql80 postgresql81 postgresql82 postgresql84 description "use postgresql83 as the drupal database" {
  depends_lib-append      port:postgresql83
  depends_lib-delete      path:bin/mysql_config5:mysql5
}

variant postgresql84 conflicts mysql4 postgresql80 postgresql81 postgresql82 postgresql83 description "use postgresql84 as the drupal database" {
  depends_lib-append      port:postgresql84
  depends_lib-delete      path:bin/mysql_config5: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
}
