# Ports collection makefile for:  metasploit
# Date created:			  18 Nov 2004
# Whom:				  Yonatan <onatan@gmail.com>
#
# $FreeBSD: ports/security/metasploit/Makefile,v 1.11 2007/04/26 09:42:19 lwhsu Exp $
#

PORTNAME=	metasploit
PORTVERSION=	2.7
CATEGORIES=	security
MASTER_SITES=	http://www.metasploit.org/tools/
DISTNAME=	framework-${PORTVERSION}

MAINTAINER=	onatan@gmail.com
COMMENT=	Exploit-Framework for Penetration-Testing

RUN_DEPENDS=	${SITE_PERL}/mach/Term/ReadLine/Gnu.pm:${PORTSDIR}/devel/p5-ReadLine-Gnu	\
		${SITE_PERL}/mach/Net/SSLeay.pm:${PORTSDIR}/security/p5-Net-SSLeay \
		${LOCALBASE}/bin/nasm:${PORTSDIR}/devel/nasm \
		${LOCALBASE}/bin/svn:${PORTSDIR}/devel/subversion

CONFLICTS=	metasploit-3*
DEPRECATED=	This port will soon be replaced by metasploit 3 (security/metasploit-devel)
EXPIRATION_DATE=	2007-05-30

NO_BUILD=	yes
USE_PERL5_RUN=	yes
REINPLACE_ARGS=	-i ''

SCRIPTS=	msfcli msfconsole msfelfscan msfencode msflogdump msfpayload \
		msfpescan msfupdate msfweb msfdldebug

post-patch:
.for f in ${SCRIPTS}
	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/${f}
.endfor
	@${REINPLACE_CMD} -e 's|framework-2.x|${DATADIR}|' ${WRKSRC}/msfupdate

do-install:
	${MKDIR} ${DATADIR}
	${CP} -Rp ${WRKSRC}/ ${DATADIR}
.for f in ${SCRIPTS}
	${LN} -s ${DATADIR}/${f} ${PREFIX}/bin
.endfor

.include <bsd.port.mk>
