# Maintainer: Thorsten Töpper # Contributor: Andrea Scarpino # Contributor: Dale Blount # Contributor: Tom Newsom # Contributor: Michal Krenek pkgname=john pkgver=1.7.8 pkgrel=4 _jumbover=7 pkgdesc="John The Ripper - A fast password cracker (jumbo-$_jumbover included)" arch=('i686' 'x86_64') url="http://www.openwall.com/$pkgname/" license=('GPL2' 'custom') depends=('openssl') backup=('etc/john/john.conf') source=(http://www.openwall.com/$pkgname/g/$pkgname-$pkgver.tar.bz2 http://www.openwall.com/john/g/john-$pkgver-jumbo-$_jumbover.diff.gz ftp://ftp.kfki.hu/pub/packages/security/ssh/ossh/libdes-4.04b.tar.gz params.h.patch) md5sums=('e6d7f261829610d6949c706ebac0517c' '6513d201dfc2e87033a4068143de3ef0' 'c8d5c69f86c2eedb485583b0305284a1' 'f69ed632eba8fb9e45847a4b4a323787') build() { # jumbo patch cd ${srcdir}/$pkgname-$pkgver patch -p1 < ${srcdir}/$pkgname-$pkgver-jumbo-$_jumbover.diff cd ${srcdir}/john-$pkgver/src/ # patch default params patch -p0 < ${srcdir}/params.h.patch if [ "$CARCH" == "x86_64" ]; then sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS = -c -Wall -O2 -march=x86-64 -DJOHN_SYSTEMWIDE=1|' Makefile sed -i 's|^LDFLAGS =\(.*\)|LDFLAGS =\1 -lm|' Makefile sed -i -e 's|-m486||g' Makefile else sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS = -c -Wall -O2 -march=i686 -DJOHN_SYSTEMWIDE=1|' Makefile fi sed -i 's|LIBS = -ldes|LIBS = -ldes -Ldes|' Makefile # sed -i 's|#include |#include "des/des.h"|' KRB5_fmt.c sed -i 's|#include |#include "des/des.h"|' KRB5_std.h # enable OMP sed -i 's|#OMPFLAGS = -fopenmp|OMPFLAGS = -fopenmp|' Makefile # build john if [ "$CARCH" == "x86_64" ]; then make linux-x86-64 else make linux-x86-mmx fi } package() { # config file sed -i 's|$JOHN|/usr/share/john|g' ${srcdir}/john-$pkgver/run/john.conf install -Dm644 ${srcdir}/john-$pkgver/run/john.conf ${pkgdir}/etc/john/john.conf # docs install -d ${pkgdir}/usr/share/doc/john install -m644 ${srcdir}/john-$pkgver/doc/* ${pkgdir}/usr/share/doc/john/ install -d ${pkgdir}/usr/share/john/ install -Dm644 ${srcdir}/john-$pkgver/doc/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE # install password list and charset files install -m644 ${srcdir}/${pkgname}-${pkgver}/run/{{all,alnum,alpha,digits,lanman}.chr,password.lst} \ ${pkgdir}/usr/share/john/ # install binaries install -Dm755 ${srcdir}/john-$pkgver/run/john ${pkgdir}/usr/bin/john install -Dm755 ${srcdir}/john-$pkgver/run/mailer ${pkgdir}/usr/bin/john-mailer cd ${pkgdir}/usr/bin ln -s john unafs ln -s john unique ln -s john unshadow ln -s john undrop ln -s john pdf2john ln -s john rar2john ln -s john ssh2john ln -s john zip2john } # vim:set ts=2 sw=2 et: