]> git.pld-linux.org Git - packages/john.git/blame - john.spec
- apply jumbo patch by default
[packages/john.git] / john.spec
CommitLineData
94f3ed69 1#
d502d3d5 2# Conditional build:
29bcf975 3%bcond_without jumbopatch # This patch integrates lots of contributed
20299915
JB
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 34Summary: Password cracker
25772a4c 35Summary(pl.UTF-8): Łamacz haseł
00a4c442 36Name: john
2f02f703 37Version: 1.7.9
20299915
JB
38Release: 1
39License: GPL v2
94f3ed69 40Group: Applications/System
255a377d 41Source0: http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2
2f02f703 42# Source0-md5: 45f54fc59386ecd67daaef9f19781d93
18fb1460 43Patch0: %{name}-mailer.patch
3443e32b 44Patch1: optflags.patch
7b8fa69c
AG
45Patch2: http://www.openwall.com/john/g/%{name}-1.7.9-jumbo-6.diff.gz
46# Patch2-md5: 685c759ec6f865ea81f40a487cd56882
5d94b024 47Patch3: %{name}-jumbo-optflags.patch
ad326883 48URL: http://www.openwall.com/john/
3443e32b 49%{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7}
4380352b 50BuildRequires: rpmbuild(macros) >= 1.213
53d2a984 51Requires: words
6ba1637d
JB
52%ifarch %{ix86} %{x8664}
53%if %{with xop}
54Requires: cpuinfo(xop)
55%endif
56%if %{with xop} || %{with avx}
57Requires: cpuinfo(avx)
58%endif
59%if %{do_sse2} && !%{do_ssefb}
60Requires: cpuinfo(sse2)
61%endif
62%endif
fbb20392 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
00a4c442 64
65%description
8e3a118d
JB
66John the Ripper is a fast password cracker, currently available for
67many flavors of Unix (11 are officially supported, not counting
68different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
69requires a contributed patch). Its primary purpose is to detect weak
70Unix passwords. Besides several crypt(3) password hash types most
71commonly found on various Unix flavors, supported out of the box are
72Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
73contributed patches.
e73a58f8 74
15ea9c6b
JR
75%description -l pl.UTF-8
76John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
77rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
8e3a118d 78architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
15ea9c6b
JR
79łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
80Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
81na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
82Windows 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
94cd src
94f3ed69 95
582fa295
ER
96cat > defs.h <<'EOF'
97#define JOHN_SYSTEMWIDE 1
98#define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
99EOF
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
105mv ../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}"
113mv ../run/john ../run/john-non-sse
114%endif
115
3443e32b 116TARG=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
156rm -rf $RPM_BUILD_ROOT
18fb1460 157install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
3443e32b
ER
158cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
159install -p run/john $RPM_BUILD_ROOT%{_bindir}
532ea34a 160%if %{do_mmxfb}
20299915
JB
161install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
162%endif
163%if %{do_ssefb}
164install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
532ea34a 165%endif
d940cdff 166
3443e32b
ER
167ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
168ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
169ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
00a4c442 170
171%clean
172rm -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
This page took 0.12257 seconds and 4 git commands to generate.