# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
Patch0: %{name}-mailer.patch
Patch1: optflags.patch
+Patch2: jumbo-optflags.patch
+Patch3: jumbo-x32.patch
URL: http://www.openwall.com/john/
%{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7}
BuildRequires: rpmbuild(macros) >= 1.213
%setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
%patch0 -p1
%{!?with_jumbo:%patch1 -p1}
+%{?with_jumbo:%patch2 -p1}
+%{?with_jumbo:%patch3 -p1}
mv john-extra-*/*.chr run
cd src
%if %{with jumbo}
+%ifarch x32
+ax_intel_x32=yes \
+%endif
%configure
%{__make}
%else
cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
install -p run/john $RPM_BUILD_ROOT%{_bindir}
+%if %{without jumbo}
%if %{do_mmxfb}
install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
%endif
%if %{do_ssefb}
install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
%endif
+%endif
ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
%attr(755,root,root) %{_bindir}/unafs
%attr(755,root,root) %{_bindir}/unique
%attr(755,root,root) %{_bindir}/unshadow
+%if %{without jumbo}
%if %{do_mmxfb} || %{do_ssefb}
%dir %{_libdir}/john
%if %{do_mmxfb}
%attr(755,root,root) %{_libdir}/john/john-non-sse
%endif
%endif
+%endif
%{_datadir}/john
--- /dev/null
+--- john-1.8.0-jumbo-1/src/Makefile.in~ 2014-12-18 14:53:53.000000000 +0100
++++ john-1.8.0-jumbo-1/src/Makefile.in 2015-08-09 20:51:57.280926480 +0200
+@@ -151,7 +151,7 @@
+ NVCC = @NVCC@
+ CCBIN = @NVCC_GCC@
+ ifdef CCBIN
+-NVCC_FLAGS += @CPU_BITS@ -ccbin=$(CCBIN)
++NVCC_FLAGS += -ccbin=$(CCBIN)
+ endif
+ JOHN_OBJS += $(CUDA_OBJS)
+ endif
+--- john-1.8.0-jumbo-1/src/aes/aesni/Makefile.in~ 2014-11-11 15:41:25.000000000 +0100
++++ john-1.8.0-jumbo-1/src/aes/aesni/Makefile.in 2015-08-09 20:53:39.198899789 +0200
+@@ -11,7 +11,7 @@
+ $(YASM) -D__@AESNI_OS@__ @YASM_OPTIONS@ $(RDTSC) -o $@
+
+ aesni.o: iaes_asm_interface.h iaesni.h intel_aes.c
+- $(CC) $(CFLAGS) @CFLAGS_EXTRA@ -m@CPU_BIT_STR@ -c intel_aes.c -o $@
++ $(CC) $(CFLAGS) @CFLAGS_EXTRA@ -c intel_aes.c -o $@
+
+ all: iaesx.o rdtsc.o aesni.o
+
--- /dev/null
+--- john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h~ 2014-05-16 15:40:40.000000000 +0200
++++ john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h 2015-08-09 21:00:28.357476188 +0200
+@@ -56,7 +56,7 @@
+ #endif
+
+ #ifdef __linux__
+-#ifndef __LP64__
++#if !(defined(__LP64__) || defined(__ILP32__))
+ #define iEncExpandKey256 _iEncExpandKey256
+ #define iEncExpandKey192 _iEncExpandKey192
+ #define iEncExpandKey128 _iEncExpandKey128