2 # no jumbo patch for 1.8.0, try making our own from github?
3 # https://github.com/magnumripper/JohnTheRipper/archive/%{version}/%{name}-%{version}-jumbo.tar.gz
6 %bcond_with jumbopatch # This patch integrates lots of contributed
7 # patches adding support for over 30
8 # of additional hash types, and more.
9 %bcond_with avx # use x86 AVX instructions
10 %bcond_with xop # use x86 XOP instructions
11 %bcond_with altivec # use PPC Altivec instructions
13 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
18 %ifarch i686 athlon pentium4
25 %define optmmxfb -DCPU_FALLBACK=1
32 %define optssefb -DCPU_FALLBACK=1
35 %define optssefb %{nil}
38 Summary: Password cracker
39 Summary(pl.UTF-8): Łamacz haseł
44 Group: Applications/System
45 Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
46 # Source0-md5: a4086df68f51778782777e60407f1869
47 Source1: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
48 # Source1-md5: bb191828e8cbfd5fe0779dff5d87d5f4
49 Patch0: %{name}-mailer.patch
50 Patch1: optflags.patch
51 Patch2: http://www.openwall.com/john/g/%{name}-1.7.9-jumbo-7.diff.gz
52 # Patch2-md5: b953fcb7f743eeeb5f938a28c352b8ef
53 Patch3: %{name}-jumbo-optflags.patch
54 Patch4: no-inline.patch
55 URL: http://www.openwall.com/john/
56 %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7}
57 BuildRequires: rpmbuild(macros) >= 1.213
58 BuildRequires: tar >= 1:1.22
61 %ifarch %{ix86} %{x8664}
63 Requires: cpuinfo(xop)
65 %if %{with xop} || %{with avx}
66 Requires: cpuinfo(avx)
68 %if %{do_sse2} && !%{do_ssefb}
69 Requires: cpuinfo(sse2)
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 John the Ripper is a fast password cracker, currently available for
76 many flavors of Unix (11 are officially supported, not counting
77 different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
78 requires a contributed patch). Its primary purpose is to detect weak
79 Unix passwords. Besides several crypt(3) password hash types most
80 commonly found on various Unix flavors, supported out of the box are
81 Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
84 %description -l pl.UTF-8
85 John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
86 rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
87 architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
88 łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
89 Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
90 na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
91 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
96 %{!?with_jumbopatch:%patch1 -p1}
97 %{?with_jumbopatch:%patch2 -p1}
98 %{?with_jumbopatch:%patch3 -p1}
100 %{?with_jumbopatch:%patch4 -p1}
103 mv john-extra-*/*.chr run
111 #define JOHN_SYSTEMWIDE 1
112 #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
116 %{__make} linux-x86-any \
118 OPTFLAGS="%{rpmcflags} -include defs.h"
119 mv ../run/john ../run/john-non-mmx
124 %{__make} linux-x86-mmx \
126 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
127 mv ../run/john ../run/john-non-sse
133 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
136 %if %{with xop} || %{with avx}
137 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
151 TARG=linux-ppc32%{?with_altivec:-altivec}
154 TARG=linux-ppc64%{?with_altivec:-altivec}
162 %ifarch sparc sparcv9
168 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
173 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
174 install -p run/john $RPM_BUILD_ROOT%{_bindir}
176 install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
179 install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
182 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
183 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
184 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
187 rm -rf $RPM_BUILD_ROOT
190 %defattr(644,root,root,755)
191 %doc doc/* run/mailer
192 %attr(755,root,root) %{_bindir}/john
193 %attr(755,root,root) %{_bindir}/unafs
194 %attr(755,root,root) %{_bindir}/unique
195 %attr(755,root,root) %{_bindir}/unshadow
196 %if %{do_mmxfb} || %{do_ssefb}
199 %attr(755,root,root) %{_libdir}/john/john-non-mmx
202 %attr(755,root,root) %{_libdir}/john/john-non-sse