2011-12-19 15:00:51 +01:00
|
|
|
# Template file for 'john'
|
|
|
|
pkgname=john
|
|
|
|
version=1.7.9
|
|
|
|
_jumbover=5
|
2014-07-15 17:59:59 +02:00
|
|
|
revision=3
|
2014-02-20 14:27:12 +01:00
|
|
|
wrksrc="${pkgname}-${version}-jumbo-${_jumbover}"
|
|
|
|
hostmakedepends="libgomp-devel"
|
2014-07-15 17:59:59 +02:00
|
|
|
makedepends="zlib-devel libgomp-devel libressl-devel"
|
2014-01-01 16:10:11 +01:00
|
|
|
conf_files="/etc/john/john.conf"
|
2011-12-19 15:00:51 +01:00
|
|
|
short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="GPL-2"
|
2012-06-04 15:45:06 +02:00
|
|
|
homepage="http://www.openwall.com/john/"
|
|
|
|
distfiles="$homepage/g/$pkgname-${version}-jumbo-${_jumbover}.tar.bz2"
|
2011-12-19 15:00:51 +01:00
|
|
|
checksum=4007aec40d2fedb1ce3287c62f23f8a1a8b8029d22cd3cbc60bb1a42f56c1a7f
|
2014-08-28 15:15:13 +02:00
|
|
|
nocross=yes
|
2011-12-19 15:00:51 +01:00
|
|
|
|
2014-07-15 17:59:59 +02:00
|
|
|
do_configure() {
|
2011-12-19 15:00:51 +01:00
|
|
|
sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS += -c -Wall -DJOHN_SYSTEMWIDE=1|' src/Makefile
|
|
|
|
sed -i 's|^LDFLAGS =\(.*\)|LDFLAGS +=\1 -lm|' src/Makefile
|
|
|
|
sed -i 's|-m486||g' src/Makefile
|
2014-08-28 15:15:13 +02:00
|
|
|
sed -i '/OMPFLAGS/s|-msse2||g' src/Makefile
|
2011-12-19 15:00:51 +01:00
|
|
|
sed -i 's|#OMPFLAGS = -fopenmp|OMPFLAGS = -fopenmp|' src/Makefile
|
2014-07-15 17:59:59 +02:00
|
|
|
sed -i 's|des_|DES_|g' src/KRB4*.c
|
|
|
|
}
|
|
|
|
do_build() {
|
2013-04-12 16:52:48 +02:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2011-12-19 15:00:51 +01:00
|
|
|
make ${makejobs} -C src linux-x86-64
|
2014-02-20 14:27:12 +01:00
|
|
|
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
2011-12-19 15:00:51 +01:00
|
|
|
make ${makejobs} -C src linux-x86-mmx
|
2014-08-28 15:15:13 +02:00
|
|
|
else
|
|
|
|
make ${makejobs} -C src generic
|
2011-12-19 15:00:51 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
# config file
|
|
|
|
sed -i 's|$JOHN|/usr/share/john|g' run/john.conf
|
|
|
|
install -Dm644 run/john.conf ${DESTDIR}/etc/john/john.conf
|
|
|
|
# docs
|
|
|
|
vmkdir usr/share/doc/john
|
2014-02-20 14:30:18 +01:00
|
|
|
vmkdir usr/share/licenses/john
|
2011-12-19 15:00:51 +01:00
|
|
|
install -m644 doc/* ${DESTDIR}/usr/share/doc/john
|
|
|
|
vmkdir usr/share/john
|
2014-02-20 14:30:18 +01:00
|
|
|
mv ${DESTDIR}/usr/share/doc/$pkgname/LICENSE ${DESTDIR}/usr/share/licenses/$pkgname
|
2011-12-19 15:00:51 +01:00
|
|
|
# install password list and charset files
|
|
|
|
install -m644 run/{{all,alnum,alpha,digits,lanman}.chr,password.lst} \
|
|
|
|
${DESTDIR}/usr/share/john
|
|
|
|
install -m644 run/{dumb16,dumb32,dynamic}.conf \
|
|
|
|
${DESTDIR}/usr/share/john
|
|
|
|
# install binaries
|
|
|
|
install -Dm755 run/john ${DESTDIR}/usr/bin/john
|
|
|
|
install -Dm755 run/mailer ${DESTDIR}/usr/bin/john-mailer
|
|
|
|
|
|
|
|
cd ${DESTDIR}/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
|
|
|
|
}
|