# $Id: Portfile,v 1.6 2005/10/04 12:50:57 mww Exp $

PortSystem 1.0
name              hydra
version           5.0
distname          ${name}-${version}-src
categories        security
maintainers       julien.touche@touche.fr.st 
description       parallized login hacker utility
long_description  \
		  Hydra is a parallized login hacker utility. Hydra can \
		  brute force attack on  \
		  FTP, POP3, IMAP, Telnet, HTTP Auth, NNTP, VNC, ICQ, \
		  Socks5, PCNFS and more  \
		  services within SSL support. This port is provided as \
		  a standalone program to \
		  avoid installing a full Nessus scanner system. \
		  \
		  NOTE: Hydra is included in Nessus!
homepage          http://www.thc.org/releases.php \
                  http://www.thehackerschoice.com
master_sites      http://www.thc.org/releases/
platforms         darwin
checksums         md5 792a9c6ec9e811f1559ee610b4428743
depends_lib       port:openssl 
patchfiles        patch-hydra-sip.c 

post-patch	{
	reinplace "s|/usr/local/|${prefix}/|g" ${worksrcpath}/configure
}

build.type        gnu
build.args        XLIBS="-lssl -lcrypto" XLIBPATHS="-L${prefix}/lib"

pre-destroot {
	reinplace "s|PREFIX=${prefix}|PREFIX=${destroot}${prefix}|" \
		${worksrcpath}/Makefile
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/README \
		${destroot}${prefix}/share/doc/${name}
}

variant libssh {
	depends_lib-append port:libssh
}

platform darwin 8 {
	build.args-append CC=/usr/bin/gcc-4.0
}
