# $Id: Portfile 62749 2010-01-15 19:47:07Z blb@macports.org $

PortSystem 1.0

name               medusa
version            1.5
revision           1
categories         security net
platforms          darwin
maintainers        pmq openmaintainer

description        Medusa is a speedy, massively parallel, modular, login brute-forcer
long_description   Medusa is intended to be a speedy, massively parallel, \
		   modular, login brute-forcer. The goal is to support as \
		   many services which allow remote authentication as possible. \
		   The author considers following items as some of the key \
		   features of this application. Thread-based parallel testing: \
		   Brute-force testing can be performed against multiple hosts, \
		   users or passwords concurrently. Flexible user input: Target \
		   information (host/user/password) can be specified in a variety \
		   of ways. For example, each item can be either a single entry \
		   or a file containing multiple entries. Additionally, a \
		   combination file format allows the user to refine their target \
		   listing. Modular design: Each service module exists as an \
		   independent .mod file. This means that no modifications are \
		   necessary to the core application in order to extend the \
		   supported list of services for brute-forcing.

homepage           http://www.foofus.net/jmk/medusa/medusa.html
master_sites       http://www.foofus.net/jmk/tools freebsd:
checksums           md5     82f884666161af80f8cee7a7d5c7554d \
                    sha1    8c9251e929303bc462f41b8a4ecded3bf19868d4 \
                    rmd160  f926db9ce2cca7cf4fb83b937e4d4fbd0da5f9c2
dist_subdir        ${name}/${version}_${revision}

depends_lib        port:openssl port:libssh2

livecheck.type	   regex
livecheck.url      ${homepage}
livecheck.regex	   "${name}-(.*?).tar.gz"

patch {
    # not very tasteful and doesn't fully work
    reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/configure
}

# --enable-untested
# hopefully the mod-path will be superfluous next release
configure.args     --with-default-mod-path=${prefix}/lib/medusa/modules \
                   --enable-module-svn=no \
                   --enable-module-postgres=no

variant subversion description "Build the Subversion module" {
    # the apr-* detection is problematic
    # configure.cppflags   "-I${prefix}/include/subversion-1 -I${prefix}/include/apr-0"
    configure.args-delete --enable-module-svn=no
    configure.args-append --enable-module-svn=yes
    depends_lib-append port:subversion
}

variant postgresql description "Build the PostgreSQL module" {
    configure.args-delete --enable-module-postgres=no
    configure.args-append --enable-module-postgres=yes
    depends_lib-append port:postgresql83
}

# FIXME check building afpfs-ng, ncp
