]>
Commit | Line | Data |
---|---|---|
94f3ed69 | 1 | # |
d502d3d5 | 2 | # Conditional build: |
20299915 JB |
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 | |
9 | # | |
532ea34a JB |
10 | %ifarch i586 i686 athlon pentium2 pentium3 pentium4 |
11 | %define do_mmx 1 | |
12 | %else | |
13 | %define do_mmx 0 | |
14 | %endif | |
20299915 JB |
15 | %ifarch i686 athlon pentium4 |
16 | %define do_sse2 1 | |
17 | %else | |
18 | %define do_sse2 0 | |
19 | %endif | |
532ea34a JB |
20 | %ifarch i586 i686 |
21 | %define do_mmxfb 1 | |
22 | %define optmmxfb -DCPU_FALLBACK=1 | |
23 | %else | |
24 | %define do_mmxfb 0 | |
25 | %undefine optmmxfb | |
d940cdff | 26 | %endif |
20299915 JB |
27 | %ifarch i686 athlon |
28 | %define do_ssefb 1 | |
29 | %define optssefb -DCPU_FALLBACK=1 | |
30 | %else | |
31 | %define do_ssefb 0 | |
32 | %define optssefb | |
33 | %endif | |
00a4c442 | 34 | Summary: Password cracker |
25772a4c | 35 | Summary(pl.UTF-8): Łamacz haseł |
00a4c442 | 36 | Name: john |
20299915 JB |
37 | Version: 1.7.7 |
38 | Release: 1 | |
39 | License: GPL v2 | |
94f3ed69 | 40 | Group: Applications/System |
255a377d | 41 | Source0: http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2 |
20299915 | 42 | # Source0-md5: be316618de834a58573a21225d4a2674 |
18fb1460 | 43 | Patch0: %{name}-mailer.patch |
3443e32b | 44 | Patch1: optflags.patch |
20299915 | 45 | %{?with_jumbopatch:Patch1: http://www.openwall.com/john/contrib/%{name}-%{version}-jumbo-1.diff.gz} |
ad326883 | 46 | URL: http://www.openwall.com/john/ |
3443e32b | 47 | %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7} |
4380352b | 48 | BuildRequires: rpmbuild(macros) >= 1.213 |
53d2a984 | 49 | Requires: words |
6ba1637d JB |
50 | %ifarch %{ix86} %{x8664} |
51 | %if %{with xop} | |
52 | Requires: cpuinfo(xop) | |
53 | %endif | |
54 | %if %{with xop} || %{with avx} | |
55 | Requires: cpuinfo(avx) | |
56 | %endif | |
57 | %if %{do_sse2} && !%{do_ssefb} | |
58 | Requires: cpuinfo(sse2) | |
59 | %endif | |
60 | %endif | |
fbb20392 | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00a4c442 | 62 | |
63 | %description | |
8e3a118d JB |
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 | |
71 | contributed patches. | |
e73a58f8 | 72 | |
15ea9c6b JR |
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 | |
8e3a118d | 76 | architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga |
15ea9c6b JR |
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. | |
e73a58f8 | 81 | |
00a4c442 | 82 | %prep |
51da11ae | 83 | %setup -q |
00a4c442 | 84 | %patch0 -p1 |
3443e32b | 85 | %patch1 -p1 |
9da9f6f0 | 86 | %{?with_jumbopatch:%patch1 -p1} |
18fb1460 | 87 | |
20299915 | 88 | %{__rm} doc/INSTALL |
3443e32b | 89 | |
00a4c442 | 90 | %build |
91 | cd src | |
94f3ed69 | 92 | |
582fa295 ER |
93 | cat > defs.h <<'EOF' |
94 | #define JOHN_SYSTEMWIDE 1 | |
95 | #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john" | |
96 | EOF | |
97 | ||
532ea34a JB |
98 | %if %{do_mmxfb} |
99 | %{__make} linux-x86-any \ | |
3443e32b | 100 | CC="%{__cc}" \ |
582fa295 | 101 | OPTFLAGS="%{rpmcflags} -include defs.h" |
532ea34a JB |
102 | mv ../run/john ../run/john-non-mmx |
103 | %{__make} clean | |
104 | %endif | |
105 | ||
20299915 JB |
106 | %if %{do_ssefb} |
107 | %{__make} linux-x86-mmx \ | |
108 | CC="%{__cc}" \ | |
109 | OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}" | |
110 | mv ../run/john ../run/john-non-sse | |
111 | %endif | |
112 | ||
3443e32b | 113 | TARG=generic |
20299915 JB |
114 | %ifarch %{x8664} |
115 | TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
116 | %endif | |
117 | %ifarch %{ix86} | |
118 | %if %{with xop} || %{with avx} | |
119 | TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
94f3ed69 | 120 | %else |
20299915 JB |
121 | %if %{do_sse2} |
122 | TARG=linux-x86-sse2 | |
123 | %else | |
124 | %if %{do_mmx} | |
125 | TARG=linux-x86-mmx | |
126 | %else | |
127 | TARG=linux-x86-any | |
128 | %endif | |
129 | %endif | |
94f3ed69 | 130 | %endif |
3443e32b | 131 | %endif |
20299915 JB |
132 | %ifarch ppc |
133 | TARG=linux-ppc32%{?with_altivec:-altivec} | |
134 | %endif | |
135 | %ifarch ppc64 | |
136 | TARG=linux-ppc64%{?with_altivec:-altivec} | |
137 | %endif | |
3443e32b ER |
138 | %ifarch alpha |
139 | TARG=linux-alpha | |
140 | %endif | |
20299915 JB |
141 | %ifarch ia64 |
142 | TARG=linux-ia64 | |
143 | %endif | |
3443e32b ER |
144 | %ifarch sparc sparcv9 |
145 | TARG=linux-sparc | |
146 | %endif | |
94f3ed69 | 147 | |
c4418ed8 | 148 | %{__make} $TARG \ |
3443e32b | 149 | CC="%{__cc}" \ |
582fa295 | 150 | OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}' |
94f3ed69 | 151 | |
00a4c442 | 152 | %install |
153 | rm -rf $RPM_BUILD_ROOT | |
18fb1460 | 154 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} |
3443e32b ER |
155 | cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john |
156 | install -p run/john $RPM_BUILD_ROOT%{_bindir} | |
532ea34a | 157 | %if %{do_mmxfb} |
20299915 JB |
158 | install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx |
159 | %endif | |
160 | %if %{do_ssefb} | |
161 | install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse | |
532ea34a | 162 | %endif |
d940cdff | 163 | |
3443e32b ER |
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 | |
00a4c442 | 167 | |
168 | %clean | |
169 | rm -rf $RPM_BUILD_ROOT | |
170 | ||
171 | %files | |
172 | %defattr(644,root,root,755) | |
1f693868 | 173 | %doc doc/* run/mailer |
3443e32b ER |
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 | |
20299915 | 178 | %if %{do_mmxfb} || %{do_ssefb} |
532ea34a | 179 | %dir %{_libdir}/john |
20299915 | 180 | %if %{do_mmxfb} |
532ea34a JB |
181 | %attr(755,root,root) %{_libdir}/john/john-non-mmx |
182 | %endif | |
20299915 JB |
183 | %if %{do_ssefb} |
184 | %attr(755,root,root) %{_libdir}/john/john-non-sse | |
185 | %endif | |
18fb1460 | 186 | %{_datadir}/john |