]>
Commit | Line | Data |
---|---|---|
94f3ed69 JB |
1 | # |
2 | # Conditional build: | |
6de5df40 | 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 | ||
7 | %ifarch i586 i686 athlon pentium2 pentium3 pentium4 | |
8 | %define do_mmx 1 | |
9 | %else | |
10 | %define do_mmx 0 | |
11 | %endif | |
12 | %ifarch i586 i686 | |
13 | %define do_mmxfb 1 | |
14 | %define optmmxfb -DCPU_FALLBACK=1 | |
15 | %else | |
16 | %define do_mmxfb 0 | |
17 | %undefine optmmxfb | |
d940cdff | 18 | %endif |
00a4c442 | 19 | Summary: Password cracker |
6de5df40 | 20 | Summary(pl.UTF-8): Łamacz haseł |
00a4c442 | 21 | Name: john |
6de5df40 | 22 | Version: 1.7.6 |
23 | Release: 2 | |
e73a58f8 | 24 | License: GPL |
94f3ed69 | 25 | Group: Applications/System |
6de5df40 | 26 | Source0: http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2 |
27 | # Source0-md5: 321ac0793f1aa4f0603b33a393133756 | |
28 | Patch0: %{name}-mailer.patch | |
29 | Patch1: optflags.patch | |
30 | %{?with_jumbopatch:Patch1: http://www.openwall.com/john/contrib/%{name}-%{version}-jumbo-2.diff.gz} | |
31 | URL: http://www.openwall.com/john/ | |
32 | %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7} | |
33 | BuildRequires: rpmbuild(macros) >= 1.213 | |
34 | Requires: words | |
fbb20392 | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00a4c442 | 36 | |
37 | %description | |
6de5df40 | 38 | John the Ripper is a fast password cracker, currently available for |
39 | many flavors of Unix (11 are officially supported, not counting | |
40 | different architectures), DOS, Win32, BeOS, and OpenVMS (the latter | |
41 | requires a contributed patch). Its primary purpose is to detect weak | |
42 | Unix passwords. Besides several crypt(3) password hash types most | |
43 | commonly found on various Unix flavors, supported out of the box are | |
44 | Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with | |
45 | contributed patches. | |
e73a58f8 | 46 | |
6de5df40 | 47 | %description -l pl.UTF-8 |
48 | John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu | |
49 | rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych | |
50 | architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga | |
51 | łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych. | |
52 | Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych | |
53 | na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz | |
54 | Windows NT/2000/XP LM, a także kilka innych przy użyciu łat. | |
e73a58f8 | 55 | |
00a4c442 | 56 | %prep |
6de5df40 | 57 | %setup -q |
00a4c442 | 58 | %patch0 -p1 |
59 | %patch1 -p1 | |
6de5df40 | 60 | %{?with_jumbopatch:%patch1 -p1} |
61 | ||
62 | rm -f doc/INSTALL | |
00a4c442 | 63 | |
64 | %build | |
65 | cd src | |
94f3ed69 | 66 | |
6de5df40 | 67 | cat > defs.h <<'EOF' |
68 | #define JOHN_SYSTEMWIDE 1 | |
69 | #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john" | |
70 | EOF | |
71 | ||
72 | %if %{do_mmxfb} | |
73 | %{__make} linux-x86-any \ | |
74 | CC="%{__cc}" \ | |
75 | OPTFLAGS="%{rpmcflags} -include defs.h" | |
76 | mv ../run/john ../run/john-non-mmx | |
77 | %{__make} clean | |
78 | %endif | |
79 | ||
80 | TARG=generic | |
94f3ed69 | 81 | %ifarch %{ix86} |
6de5df40 | 82 | %if %{do_mmx} |
83 | TARG=linux-x86-mmx | |
94f3ed69 | 84 | %else |
6de5df40 | 85 | TARG=linux-x86-any |
94f3ed69 JB |
86 | %endif |
87 | %endif | |
6de5df40 | 88 | %ifarch alpha |
89 | TARG=linux-alpha | |
90 | %endif | |
91 | %ifarch sparc sparcv9 | |
92 | TARG=linux-sparc | |
93 | %endif | |
94 | %ifarch %{x8664} | |
95 | TARG=linux-x86-64 | |
96 | %endif | |
94f3ed69 | 97 | |
6de5df40 | 98 | %{__make} $TARG \ |
99 | CC="%{__cc}" \ | |
100 | OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}' | |
94f3ed69 | 101 | |
00a4c442 | 102 | %install |
103 | rm -rf $RPM_BUILD_ROOT | |
6de5df40 | 104 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} |
105 | cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john | |
106 | install -p run/john $RPM_BUILD_ROOT%{_bindir} | |
107 | %if %{do_mmxfb} | |
108 | install -d $RPM_BUILD_ROOT%{_libdir}/john | |
109 | install -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john | |
110 | %endif | |
00a4c442 | 111 | |
6de5df40 | 112 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs |
113 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique | |
114 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow | |
00a4c442 | 115 | |
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
a7cfa7fc | 121 | %doc doc/* run/mailer |
6de5df40 | 122 | %attr(755,root,root) %{_bindir}/john |
123 | %attr(755,root,root) %{_bindir}/unafs | |
124 | %attr(755,root,root) %{_bindir}/unique | |
125 | %attr(755,root,root) %{_bindir}/unshadow | |
126 | %if %{do_mmxfb} | |
127 | %dir %{_libdir}/john | |
128 | %attr(755,root,root) %{_libdir}/john/john-non-mmx | |
129 | %endif | |
130 | %{_datadir}/john |