# Contributor: Ivan Tham # Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=john pkgver=1.9.0 _pkgrel=jumbo-1 pkgrel=1 pkgdesc="John the Ripper password cracker" url="https://www.openwall.com/john" arch="all !s390x !x86 !ppc64le" license="GPL-2.0-or-later" depends="nss" options="!strip" makedepends="libpcap-dev openssl-dev gmp-dev yasm-dev zlib-dev" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/magnumripper/JohnTheRipper/archive/$pkgver.tar.gz" builddir="$srcdir"/JohnTheRipper-$pkgver build() { cd "$builddir"/src local _arch= case "$CARCH" in aarch64) _arch=arm64le;; arm*) _arch=arm32le;; ppc64le) _arch=ppc64;; x86) _arch=x86-any;; x86_64) _arch=x86-64; esac make linux-$_arch } check() { cd "$builddir"/run ./john --test } package() { mkdir -p "$pkgdir"/usr/bin mkdir -p "$pkgdir"/usr/share/doc/$pkgname install -Dm644 run/john.conf "$pkgdir"/etc/john/john.conf install -Dm644 doc/* "$pkgdir"/usr/share/doc/$pkgname install -Dm644 doc/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE rm "$pkgdir"/usr/share/doc/$pkgname/LICENSE* find run -type f -executable | while read bin; do install -Dm755 $bin "$pkgdir"/usr/bin done for link in unafs unique unshadow; do ln -s john "$pkgdir"/usr/bin/$link done install -Dm644 run/password.lst "$pkgdir"/usr/share/john/password.lst } sha512sums="408e67b0aff67b37fe20f7a07ccdd1e3d4788c68866974c970d091ab41977bfe1c9cc72417f3320ff0b910516093c9fe0023cd8a214d086b5754a224eff01709 john-1.9.0.tar.gz"