]>
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 |
2f02f703 | 37 | Version: 1.7.9 |
20299915 JB |
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 |
2f02f703 | 42 | # Source0-md5: 45f54fc59386ecd67daaef9f19781d93 |
18fb1460 | 43 | Patch0: %{name}-mailer.patch |
3443e32b | 44 | Patch1: optflags.patch |
0e932322 AG |
45 | Patch2: http://www.openwall.com/john/g/%{name}-1.7.9-jumbo-5.diff.gz |
46 | # Patch2-md5: 68cacb612f20c71eed6c24cbaf28148a | |
5d94b024 | 47 | Patch3: %{name}-jumbo-optflags.patch |
ad326883 | 48 | URL: http://www.openwall.com/john/ |
3443e32b | 49 | %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7} |
4380352b | 50 | BuildRequires: rpmbuild(macros) >= 1.213 |
53d2a984 | 51 | Requires: words |
6ba1637d JB |
52 | %ifarch %{ix86} %{x8664} |
53 | %if %{with xop} | |
54 | Requires: cpuinfo(xop) | |
55 | %endif | |
56 | %if %{with xop} || %{with avx} | |
57 | Requires: cpuinfo(avx) | |
58 | %endif | |
59 | %if %{do_sse2} && !%{do_ssefb} | |
60 | Requires: cpuinfo(sse2) | |
61 | %endif | |
62 | %endif | |
fbb20392 | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00a4c442 | 64 | |
65 | %description | |
8e3a118d JB |
66 | John the Ripper is a fast password cracker, currently available for |
67 | many flavors of Unix (11 are officially supported, not counting | |
68 | different architectures), DOS, Win32, BeOS, and OpenVMS (the latter | |
69 | requires a contributed patch). Its primary purpose is to detect weak | |
70 | Unix passwords. Besides several crypt(3) password hash types most | |
71 | commonly found on various Unix flavors, supported out of the box are | |
72 | Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with | |
73 | contributed patches. | |
e73a58f8 | 74 | |
15ea9c6b JR |
75 | %description -l pl.UTF-8 |
76 | John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu | |
77 | rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych | |
8e3a118d | 78 | architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga |
15ea9c6b JR |
79 | łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych. |
80 | Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych | |
81 | na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz | |
82 | Windows NT/2000/XP LM, a także kilka innych przy użyciu łat. | |
e73a58f8 | 83 | |
00a4c442 | 84 | %prep |
51da11ae | 85 | %setup -q |
00a4c442 | 86 | %patch0 -p1 |
5d94b024 | 87 | %{!?with_jumbopatch:%patch1 -p1} |
663c478a | 88 | %{?with_jumbopatch:%patch2 -p1} |
5d94b024 | 89 | %{?with_jumbopatch:%patch3 -p1} |
18fb1460 | 90 | |
20299915 | 91 | %{__rm} doc/INSTALL |
3443e32b | 92 | |
00a4c442 | 93 | %build |
94 | cd src | |
94f3ed69 | 95 | |
582fa295 ER |
96 | cat > defs.h <<'EOF' |
97 | #define JOHN_SYSTEMWIDE 1 | |
98 | #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john" | |
99 | EOF | |
100 | ||
532ea34a JB |
101 | %if %{do_mmxfb} |
102 | %{__make} linux-x86-any \ | |
3443e32b | 103 | CC="%{__cc}" \ |
582fa295 | 104 | OPTFLAGS="%{rpmcflags} -include defs.h" |
532ea34a JB |
105 | mv ../run/john ../run/john-non-mmx |
106 | %{__make} clean | |
107 | %endif | |
108 | ||
20299915 JB |
109 | %if %{do_ssefb} |
110 | %{__make} linux-x86-mmx \ | |
111 | CC="%{__cc}" \ | |
112 | OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}" | |
113 | mv ../run/john ../run/john-non-sse | |
114 | %endif | |
115 | ||
3443e32b | 116 | TARG=generic |
20299915 JB |
117 | %ifarch %{x8664} |
118 | TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
119 | %endif | |
120 | %ifarch %{ix86} | |
121 | %if %{with xop} || %{with avx} | |
122 | TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
94f3ed69 | 123 | %else |
20299915 JB |
124 | %if %{do_sse2} |
125 | TARG=linux-x86-sse2 | |
126 | %else | |
127 | %if %{do_mmx} | |
128 | TARG=linux-x86-mmx | |
129 | %else | |
130 | TARG=linux-x86-any | |
131 | %endif | |
132 | %endif | |
94f3ed69 | 133 | %endif |
3443e32b | 134 | %endif |
20299915 JB |
135 | %ifarch ppc |
136 | TARG=linux-ppc32%{?with_altivec:-altivec} | |
137 | %endif | |
138 | %ifarch ppc64 | |
139 | TARG=linux-ppc64%{?with_altivec:-altivec} | |
140 | %endif | |
3443e32b ER |
141 | %ifarch alpha |
142 | TARG=linux-alpha | |
143 | %endif | |
20299915 JB |
144 | %ifarch ia64 |
145 | TARG=linux-ia64 | |
146 | %endif | |
3443e32b ER |
147 | %ifarch sparc sparcv9 |
148 | TARG=linux-sparc | |
149 | %endif | |
94f3ed69 | 150 | |
c4418ed8 | 151 | %{__make} $TARG \ |
3443e32b | 152 | CC="%{__cc}" \ |
582fa295 | 153 | OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}' |
94f3ed69 | 154 | |
00a4c442 | 155 | %install |
156 | rm -rf $RPM_BUILD_ROOT | |
18fb1460 | 157 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} |
3443e32b ER |
158 | cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john |
159 | install -p run/john $RPM_BUILD_ROOT%{_bindir} | |
532ea34a | 160 | %if %{do_mmxfb} |
20299915 JB |
161 | install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx |
162 | %endif | |
163 | %if %{do_ssefb} | |
164 | install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse | |
532ea34a | 165 | %endif |
d940cdff | 166 | |
3443e32b ER |
167 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs |
168 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique | |
169 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow | |
00a4c442 | 170 | |
171 | %clean | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %files | |
175 | %defattr(644,root,root,755) | |
1f693868 | 176 | %doc doc/* run/mailer |
3443e32b ER |
177 | %attr(755,root,root) %{_bindir}/john |
178 | %attr(755,root,root) %{_bindir}/unafs | |
179 | %attr(755,root,root) %{_bindir}/unique | |
180 | %attr(755,root,root) %{_bindir}/unshadow | |
20299915 | 181 | %if %{do_mmxfb} || %{do_ssefb} |
532ea34a | 182 | %dir %{_libdir}/john |
20299915 | 183 | %if %{do_mmxfb} |
532ea34a JB |
184 | %attr(755,root,root) %{_libdir}/john/john-non-mmx |
185 | %endif | |
20299915 JB |
186 | %if %{do_ssefb} |
187 | %attr(755,root,root) %{_libdir}/john/john-non-sse | |
188 | %endif | |
d0c69092 | 189 | %endif |
18fb1460 | 190 | %{_datadir}/john |