summaryrefslogtreecommitdiff
blob: 4bee578453ea13d79cbe8451e57cd1e81b3e00b5 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/ophcrack/ophcrack-3.0.ebuild,v 1.1 2008/07/21 19:16:12 ikelos Exp $

inherit toolchain-funcs autotools eutils

BKHIVE_VER="1.1.1"
SAMDUMP_VER="1.1.1"

DESCRIPTION="A time-memory-trade-off-cracker"
HOMEPAGE="http://ophcrack.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
	mirror://sourceforge/${PN}/bkhive-${BKHIVE_VER}.tar.gz
	mirror://sourceforge/${PN}/samdump2-${SAMDUMP_VER}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND="app-arch/unzip
		>=dev-util/pkgconfig-0.22
		dev-libs/openssl
		net-libs/netwib
		>=x11-libs/qt-4"
RDEPEND="dev-libs/openssl
		 net-libs/netwib
		 >=x11-libs/qt-4
		 app-crypt/ophcrack-tables"

src_unpack() {
	unpack ${A}
	cd "${S}"
	eautoreconf
	epatch "${FILESDIR}/${P}-makefile.patch"
}

src_compile() {
	# Make samdump2
	einfo "Compiling samdump2"
	cd "${WORKDIR}/samdump2-${SAMDUMP_VER}"
	MAKEOPTS="-j1" emake || die "Failed to make samdump"

	# Make bkhive2
	einfo "Compiling bkhive"
	cd "${WORKDIR}/bkhive-${BKHIVE_VER}"
	MAKEOPTS="-j1" emake || die "Failed to make bkhive2"

	# Make the program
	einfo "Compiling ophcrack"
	cd "${S}"
	econf
	emake || die "Failed to make ophcrack"

	# Don't try to install the prebuilt binaries,
	# they'll cause an access violation
	rm -fr "${S}/linux_tools"
}

src_install() {
	make install DESTDIR="${D}"

	cd "${WORKDIR}/bkhive-${BKHIVE_VER}"
	make install DESTDIR="${D}" PREFIX=/usr/

	cd "${WORKDIR}/samdump2-${SAMDUMP_VER}"
	make install DESTDIR="${D}" PREFIX=/usr/
}