# $Id: Portfile 45763 2009-01-21 14:42:12Z jmr@macports.org $

PortSystem 1.0

name		authforce
version		0.9.6
description	A HTTP authentication brute forcer.
long_description	Authforce is an HTTP authentication brute forcer. \
			Using various methods, it attempts brute force \
			username and password pairs for a site. It has the \
			ability to try common username and passwords, username \
			derivations, and common username/password pairs. It is \
			used to both test the security of your site and to \
			prove the insecurity of HTTP authentication based on the \
			fact that users just don?t pick good passwords.
maintainers	nomaintainer
categories	security www
platforms	darwin
homepage	http://kapheine.hypa.net/authforce/
master_sites	${homepage}
checksums	md5 80afaa64afb43ddbecf0209e4d109124
depends_lib	port:gettext path:lib/pkgconfig/glib-2.0.pc:glib2 port:readline
use_bzip2 	yes
configure.ldflags-append -lintl
configure.args	--mandir=${prefix}/share/man --infodir=${prefix}/share/info

patchfiles  patch-http.c.diff

pre-configure {
		system "cd ${worksrcpath}/doc && gunzip authforce.1.gz"
		reinplace "s|authforce.1.gz|authforce.1|g" ${worksrcpath}/doc/Makefile.in
		reinplace "s|authforce.1.gz|authforce.1|g" ${worksrcpath}/doc/Makefile.am
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/configure
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/intl/bindtextdom.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/intl/dcgettext.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/intl/finddomain.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/intl/localealias.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/intl/cat-compat.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/src/extract.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/src/methods.c
		reinplace "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/src/misc.c
}
