-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
102 lines (88 loc) · 2.4 KB
/
template
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Template file for 'john'
pkgname=john
version=1.9.0
revision=7
_jumbover=1
build_wrksrc="src"
build_style=gnu-configure
configure_args="--with-systemwide $(vopt_enable simd)"
makedepends="openssl-devel gmp-devel libgomp-devel libpcap-devel bzip2-devel zlib-devel"
short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)"
maintainer="Piraty <mail@piraty.dev>"
license="custom: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=3
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libxcrypt-devel"
fi
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
}