3 %bcond_with jumbopatch # This patch integrates lots of contributed
4 # patches adding support for over 30
5 # of additional hash types, and more.
6 %bcond_with avx # use x86 AVX instructions
7 %bcond_with xop # use x86 XOP instructions
8 %bcond_with altivec # use PPC Altivec instructions
10 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
15 %ifarch i686 athlon pentium4
22 %define optmmxfb -DCPU_FALLBACK=1
29 %define optssefb -DCPU_FALLBACK=1
34 Summary: Password cracker
35 Summary(pl.UTF-8): Łamacz haseł
40 Group: Applications/System
41 Source0: http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2
42 # Source0-md5: e6d7f261829610d6949c706ebac0517c
43 Patch0: %{name}-mailer.patch
44 Patch1: optflags.patch
45 Patch2: http://www.openwall.com/john/g/%{name}-%{version}-jumbo-2.diff.gz
46 URL: http://www.openwall.com/john/
47 %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7}
48 BuildRequires: rpmbuild(macros) >= 1.213
50 %ifarch %{ix86} %{x8664}
52 Requires: cpuinfo(xop)
54 %if %{with xop} || %{with avx}
55 Requires: cpuinfo(avx)
57 %if %{do_sse2} && !%{do_ssefb}
58 Requires: cpuinfo(sse2)
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 John the Ripper is a fast password cracker, currently available for
65 many flavors of Unix (11 are officially supported, not counting
66 different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
67 requires a contributed patch). Its primary purpose is to detect weak
68 Unix passwords. Besides several crypt(3) password hash types most
69 commonly found on various Unix flavors, supported out of the box are
70 Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
73 %description -l pl.UTF-8
74 John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
75 rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
76 architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
77 łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
78 Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
79 na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
80 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
86 %{?with_jumbopatch:%patch2 -p1}
94 #define JOHN_SYSTEMWIDE 1
95 #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
99 %{__make} linux-x86-any \
101 OPTFLAGS="%{rpmcflags} -include defs.h"
102 mv ../run/john ../run/john-non-mmx
107 %{__make} linux-x86-mmx \
109 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
110 mv ../run/john ../run/john-non-sse
115 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
118 %if %{with xop} || %{with avx}
119 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
133 TARG=linux-ppc32%{?with_altivec:-altivec}
136 TARG=linux-ppc64%{?with_altivec:-altivec}
144 %ifarch sparc sparcv9
150 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
155 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
156 install -p run/john $RPM_BUILD_ROOT%{_bindir}
158 install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
161 install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
164 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
165 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
166 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
169 rm -rf $RPM_BUILD_ROOT
172 %defattr(644,root,root,755)
173 %doc doc/* run/mailer
174 %attr(755,root,root) %{_bindir}/john
175 %attr(755,root,root) %{_bindir}/unafs
176 %attr(755,root,root) %{_bindir}/unique
177 %attr(755,root,root) %{_bindir}/unshadow
178 %if %{do_mmxfb} || %{do_ssefb}
181 %attr(755,root,root) %{_libdir}/john/john-non-mmx
184 %attr(755,root,root) %{_libdir}/john/john-non-sse