2 # Maintainer: Jan Misiak <fijam [at] archlinux.us>
3 # Based off PKGBUILD in extra by Dale Blount <dale@archlinux.org>
4 # Original Contributor: Tom Newsom <Jeepster@gmx.co.uk>
10 pkgdesc="John the Ripper is a fast password cracker. Development version with Jumbo patchset appplied."
11 arch=('i686' 'x86_64')
12 url="http://www.openwall.com/john/"
16 source=(ftp://ftp.openwall.com/john/$pkgver/john-$pkgver.tar.gz \
17 http://www.openwall.com/john/contrib/john-$pkgver-jumbo-1.diff.gz \
18 ftp://ftp.kfki.hu/pub/packages/security/ssh/ossh/libdes-4.04b.tar.gz \
20 md5sums=('b8055b53076691add77a717721e8b170'
21 '337fecc7275a5dc9e4b103c0233b0518'
22 'c8d5c69f86c2eedb485583b0305284a1'
23 'f69ed632eba8fb9e45847a4b4a323787')
28 patch -p0 < ${srcdir}/john-$pkgver-jumbo-1.diff || return 1
29 cd ${srcdir}/john-$pkgver/src/
31 # patch default params
32 patch -p0 < ${srcdir}/params.h.patch || return 1
33 if [ "$CARCH" == "x86_64" ]; then
34 sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS = -c -Wall -O2 -march=x86-64 -DJOHN_SYSTEMWIDE=1|' Makefile || return 1
35 sed -i 's|^LDFLAGS =\(.*\)|LDFLAGS =\1 -lm|' Makefile || return 1
36 sed -i -e 's|-m486||g' Makefile || return 1
37 else sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS = -c -Wall -O2 -march=i686 -DJOHN_SYSTEMWIDE=1|' Makefile || return 1
39 sed -i 's|LIBS = -ldes|LIBS = -ldes -Ldes|' Makefile || return 1
40 sed -i 's|#include <des.h>|#include "des/des.h"|' KRB5_fmt.c || return 1
41 sed -i 's|#include <des.h>|#include "des/des.h"|' KRB5_std.h || return 1
44 if [ "$CARCH" == "x86_64" ]; then
45 make linux-x86-64 || return 1
46 else make linux-x86-mmx || return 1
50 install -d ${pkgdir}/etc/john
51 sed -i 's|$JOHN|/usr/share/john|g' ${srcdir}/john-$pkgver/run/john.conf || return 1
52 install -m644 ${srcdir}/john-$pkgver/run/john.conf ${pkgdir}/etc/john/john.conf
55 install -d ${pkgdir}/usr/share/doc/john
56 install -m644 ${srcdir}/john-$pkgver/doc/* ${pkgdir}/usr/share/doc/john
58 # password lists, charset and stats files
59 install -d ${pkgdir}/usr/share/john/
60 install -m644 ${srcdir}/john-${pkgver}/run/{{all,alnum,alpha,digits,lanman}.chr,password.lst,stats} ${pkgdir}/usr/share/john/ || return 1
63 install -d ${pkgdir}/usr/bin
64 if [ "$CARCH" == "x86_64" ]; then
65 make linux-x86-64 || return 1
66 else make linux-x86-mmx || return 1
68 install -m755 ${srcdir}/john-$pkgver/run/john ${pkgdir}/usr/bin/john
69 install -m755 ${srcdir}/john-$pkgver/run/mailer ${pkgdir}/usr/bin/john-mailer
72 #install jumbo binaries
73 install -d ${pkgdir}/usr/sbin
74 install -m755 ${srcdir}/john-$pkgver/run/genmkvpwd ${pkgdir}/usr/sbin/genmkvpwd
75 install -m755 ${srcdir}/john-$pkgver/run/calc_stat ${pkgdir}/usr/sbin/calc_stat
76 install -m755 ${srcdir}/john-$pkgver/run/mkvcalcproba ${pkgdir}/usr/sbin/mkvcalcproba