PortSystem 1.0

name             aolserver
version          4.5.1
categories       www
maintainers      toby
description      America Online's open-source web server
long_description \
    AOLserver is America Online's open-source web server. AOLserver is the \
    backbone of the largest and busiest production environments in the \
    world. AOLserver is a multithreaded, Tcl-enabled web server used for \
    large scale, dynamic web sites.
homepage         http://aolserver.github.io/
platforms        darwin
license          AOLserver Public License

master_sites     sourceforge
distname         ${name}-${version}-src
checksums        md5    d7aa89d6b864d75460fafd2f26553fec \
                 sha1   9b37a883b34902d80bf042a1bd8d274f585fe843 \
                 rmd160 c35faa53ecae93e494f4c44dc1bf3594391562ce

# Requires tcl +threads, see ticket #126
depends_lib      port:tcl

worksrcdir       ${name}-${version}

configure.pre_args --prefix=${prefix}/aolserver
configure.args   --with-tcl=${prefix}/lib
configure.env    TCLSH=${prefix}/bin/tclsh

destroot.destdir AOLSERVER=${destroot}${prefix}/aolserver
destroot.violate_mtree yes

# convert to notes once 1.8.0 is released
post-install {
    ui_msg ""
    ui_msg "AOLserver installed into ${prefix}/aolserver"
    ui_msg ""
    ui_msg "You now need to configure the server to your needs. You "
    ui_msg "might want to create another user (e.g. aolserver) to run "
    ui_msg "the server."
}

livecheck.type   regex
livecheck.url    ${homepage}
livecheck.regex  AOLserver (\[^ \]+) released