# $Id: Portfile 66035 2010-04-05 07:14:10Z ryandesign@macports.org $

PortSystem              1.0

name                    freeradius
version                 2.1.8
categories              sysutils
maintainers             nomaintainer
homepage                http://www.freeradius.org/
platforms               darwin freebsd
use_bzip2               yes
distname                ${name}-server-${version}

description             Free Radius Implementation

long_description        The FreeRADIUS Server Project is an attempt to create \
                        a high-performance and highly-configurable GPLd free \
                        RADIUS server. The server is similar to Livingston's \
                        2.0 server. FreeRADIUS is a variant of the Cistron \
                        RADIUS server, but they don't share a lot in common \
                        anymore.

master_sites            ftp://ftp.freeradius.org/pub/freeradius/ \
                        ftp://ftp.freeradius.org/pub/freeradius/old

checksums               md5     d326525490bfba273471d77560471fcb \
                        sha1    f01a8add62b790033cc861d55dc0d09a4678beac \
                        rmd160  9ad8e19eda1b7da89fde3d0e345a0cc6b13eba88

depends_lib             port:libtool \
                        port:libpcap \
                        port:openldap \
                        port:openssl \
                        port:unixODBC \
                        port:gdbm

patchfiles              patch-configure.in.diff

use_autoconf            yes

configure.args          --with-openssl-includes=${prefix}/include/openssl \
                        --with-openssl-libraries=${prefix}/lib \
                        --with-system-libtool \
                        --without-rlm_krb5

configure.cflags-append -I${prefix}/include

use_parallel_build      no

destroot.env-append     R=${destroot}

variant kerberos description { Use Kerberos } {
     depends_lib-append port:kerberos5
     configure.args-delete --without-rlm_krb5
}

livecheck.type          regex
livecheck.url           [lindex ${master_sites} 0]
livecheck.regex         ${name}-server-(\[0-9.\]+)\\.tar
