void-packages/srcpkgs/john/template
Andrew Benson e347e19f85 john: make simd a build option, off by default
This solves the problem of SIMD features being enabled and leaking in on all
architectures, not just ppc*. It is now provided as a build option if there
if is a want/need to enable these for custom builds.
2020-05-31 10:59:35 -05:00

99 lines
2.4 KiB
Bash

# Template file for 'john'
pkgname=john
version=1.9.0
revision=2
_jumbover=1
wrksrc="${pkgname}-${version}-jumbo-${_jumbover}"
build_wrksrc="src"
build_style=gnu-configure
configure_args="--with-systemwide $(vopt_enable simd)"
makedepends="libressl-devel gmp-devel libgomp-devel libpcap-devel bzip2-devel zlib-devel"
short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)"
maintainer="Piraty <piraty1@inbox.ru>"
license="GPL-2.0-or-later with OpenSSL-exception"
homepage="https://www.openwall.com/john/"
distfiles="$homepage/k/$pkgname-${version}-jumbo-${_jumbover}.tar.xz"
checksum=f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b
python_version=2 #unverified
build_options="simd"
pre_configure() {
unset CPP AS LD
}
# Tests cannot be run because include statements for rules in john.conf search
# in /usr/share/john, even if $JOHN is replaced and points to
# `/builddir/john-.../run`.
do_check() {
:
}
do_install() {
# doc and license
cd ../
cp -r doc doc.tmp ; cd doc.tmp
for f in *LICENSE* COPYING; do
vlicense $f
rm $f
done
rm INSTALL*
rm -r extras
for f in * ; do
vdoc $f
done
cd .. ; rm -r doc.tmp
cd run
# binaries
vbin john
for f in SIPdump bitlocker2john calc_stat cprepair dmg2john eapmd5tojohn \
genmkvpwd hccap2john keepass2john mkvcalcproba putty2john racf2john \
raw2dyna tgtsnarf uaf2john vncpcap2john wpapcap2john ; do
vbin $f
done
# scripts
for ext in lua pl rb py; do
for f in *.$ext ; do
vbin $f ${f/.$ext}
done
done
vbin mailer john-mailer
# data
vmkdir usr/share/john
vcopy john.conf usr/share/john
vcopy rules usr/share/john
vcopy "*.chr" usr/share/john
vcopy "*.lst" usr/share/john
vcopy "*.conf" usr/share/john
vcopy "*.js" usr/share/john
vmkdir usr/share/applications
vcopy "../src/packaging/*.desktop" usr/share/applications/john.desktop
vmkdir usr/share/bash-completion/completions
vinstall john.bash_completion 644 usr/share/bash-completion/completions/ john
vmkdir usr/share/zsh/site-functions
vinstall john.zsh_completion 644 usr/share/zsh/site-functions/ _john
}
post_install() {
cd $DESTDIR
vsed -i ${DESTDIR}/usr/share/john/john.conf \
-e 's|$JOHN|/usr/share/john|g'
# fix some perms
chmod 644 $(find ${DESTDIR}/usr/share/ -type f)
cd usr/bin
ln -s john unafs
ln -s john unique
ln -s john unshadow
ln -s john undrop
ln -s john gpg2john
ln -s john rar2john
ln -s john zip2john
}