summaryrefslogtreecommitdiff
blob: 0493e5d263897618a2d945106a6ee2a2d70b77c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.6.ebuild,v 1.7 2003/02/10 06:46:26 seemant Exp $

inherit eutils

IUSE="mmx"

PN0="john"
S=${WORKDIR}/${PN0}-${PV}
DEBPATCH=${PN0}_${PV}-17.diff.gz
DESCRIPTION="John the Ripper is a fast password cracker."
HOMEPAGE="http://www.openwall.com/${PN0}/"
SRC_URI="${HOMEPAGE}/${PN0}-${PV}.tar.gz
	 http://ftp.debian.org/debian/pool/main/j/${PN0}/${DEBPATCH}"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 sparc "

DEPEND=">=sys-devel/binutils-2.8.1.0.15"

src_unpack() {
	unpack ${PN0}-${PV}.tar.gz
	epatch ${DISTDIR}/${DEBPATCH}
}

src_compile() {
	cd src
	mv Makefile Makefile.orig
	sed -e "s:-m486::" -e "s:-Wall -O2:${CFLAGS}:" \
		Makefile.orig > Makefile
	if [ `use mmx` ] ; then
		emake linux-x86-mmx-elf || die
	else
		emake generic || die
	fi
}

src_install() {
	dodir /usr/share/${PN0} /etc
	insinto /etc
	doins run/john.ini debian/john-mail.msg debian/john-mail.conf
	insinto /usr/share/${PN0}
	doins run/{all.chr,alpha.chr,digits.chr,lanman.chr,password.lst} \
		debian/john-dailyscript
	dodoc debian/{CONFIG.mailer,copyright} doc/* 
	doman debian/{john.1,mailer.1,unafs.1,unique.1,unshadow.1,john-cronjob.1}
	dosbin run/john debian/mailer debian/john-cronjob
	(cd ${D}/usr/sbin; ln -s john unafs; ln -s john unique; ln -s john unshadow)
}