summaryrefslogtreecommitdiff
blob: f7bd3ae52571f32e21c1f3bb348904a0149ef98a (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/pkcrack/pkcrack-1.2.2.ebuild,v 1.7 2009/03/22 15:58:07 arfrever Exp $

inherit toolchain-funcs

DESCRIPTION="PkZip cipher breaker"
HOMEPAGE="http://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html"
SRC_URI="http://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/${P}.tar.gz"
LICENSE="pkcrack"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="test"
DEPEND="test? ( app-arch/zip )"
RDEPEND="!<app-text/html-xml-utils-5.3"

src_unpack() {
	unpack ${A}
	cd "${S}/src"
	sed -i -e "s/^CC=.*/CC=$(tc-getCC)/" \
		-e "/^CFLAGS=.*/d" \
		-e "s/CFLAGS/LDFLAGS/" \
		Makefile || die "sed Makefile failed"
	sed -i -e "s:void main:int main:" *.c || die "sed *.c failed"
}

src_compile() {
	cd "${S}/src"
	emake || die "emake failed"
}

src_test() {
	cd "${S}/test"
	make CC="$(tc-getCC)" all || die "self test failed"
}

src_install() {
	cd "${S}/src"
	dobin pkcrack zipdecrypt findkey extract makekey || die "dobin failed"
	dodoc "${S}/doc/"*
}

pkg_postinst() {
	elog "Author DEMANDS :-) a postcard be sent to:"
	elog
	elog "    Peter Conrad"
	elog "    Am Heckenberg 1"
	elog "    56727 Mayen"
	elog "    Germany"
	elog
	elog "See: http://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-readme.html"
	epause 5
}