aboutsummaryrefslogtreecommitdiffstats
path: root/security/john/Makefile
blob: 70382aa1ff7929fa9626e0af2ee5f4123598c811 (plain) (blame)
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
# ex:ts=8
# Ports collection makefile for:  john
# Date created:           Sun Mar 09, 1997
# Whom:               David O'Brien (obrien@FreeBSD.org)
#
# $FreeBSD$
#

PORTNAME=   john
PORTVERSION=    1.6.34
CATEGORIES= security
MASTER_SITES=   http://www.openwall.com/john/dl/ \
        ftp://ftp.ru.openwall.com/pub/projects/john/
DISTFILES=  ${PORTNAME}-${PORTVERSION}.tar.gz \
        ${PORTNAME}-1.6.tar.gz

MAINTAINER= dominic.marks@btinternet.com
COMMENT=    Featureful Unix password cracker

USE_REINPLACE=  yes

.include <bsd.port.pre.mk>

OSNAME=     ${OPSYS:S/F/f/:S/N/n/:S/O/o/:S/B/b/:S/S/s/:S/D/d/}

ALL_TARGET= generic
.if ${MACHINE_ARCH} == "i386"
. if ${MACHINE_CPU:Mmmx}
ALL_TARGET= ${OSNAME}-x86-mmx-elf
. else
ALL_TARGET= ${OSNAME}-x86-any-elf
. endif
.elif ${MACHINE_ARCH} == "alpha"
ALL_TARGET= ${OSNAME}-alpha
.endif

WRKSRC=     ${WRKDIR}/${DISTNAME}/src
OLDSRC=     ${WRKDIR}/${PORTNAME}-1.6/run

pre-build:
    @${ECHO} "Building for ${ALL_TARGET}"

do-configure:
    @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
        ${WRKDIR}/${DISTNAME}/src/params.h \
        ${WRKDIR}/${DISTNAME}/run/john.conf

do-install:
    @${MKDIR} ${DATADIR}
    @${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/run/john ${PREFIX}/bin
    @cd ${PREFIX}/bin ; ${LN} -sf john xtract
    @cd ${PREFIX}/bin ; ${LN} -sf john unshadow
    @${INSTALL_DATA} \
        ${OLDSRC}/all.chr \
        ${OLDSRC}/alpha.chr \
        ${OLDSRC}/digits.chr \
        ${OLDSRC}/lanman.chr \
        ${WRKDIR}/${DISTNAME}/run/password.lst \
        ${WRKDIR}/${DISTNAME}/run/john.conf \
            ${DATADIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/* ${DOCSDIR}
.endif

.include <bsd.port.post.mk>